Lines Matching defs:parameter

46  * unregistered parameter sanitizer does not allow any special characters,
64 * A simple tuple that holds parameter-value pairs.
69 * Construct a parameter-value tuple.
70 * @param parameter an unencoded parameter
73 public ParameterValuePair(String parameter,
75 mParameter = parameter;
79 * The unencoded parameter
410 * unregistered parameter values.
412 * <b>Note:</b> The default unregistered parameter value sanitizer is
417 * parameter values.
425 * parameter values.
427 * parameter values.
557 * <li>the last instance of a repeated parameter is preferred.
580 * <li>the last instance of a repeated parameter is preferred.
609 * Parse a query. A query string is any number of parameter-value clauses
610 * separated by any non-zero number of ampersands. A parameter-value clause
611 * is a parameter followed by an equal sign, followed by a value. If the
646 * An array list of all of the parameter value pairs in the sanitized
656 * Check if a parameter exists in the current sanitized query.
657 * @param parameter the unencoded name of a parameter.
660 public boolean hasParameter(String parameter) {
661 return mEntries.containsKey(parameter);
665 * Get the value for a parameter in the current sanitized query.
666 * Returns null if the parameter does not
668 * @param parameter the unencoded name of a parameter.
669 * @return the sanitized unencoded value of the parameter,
670 * or null if the parameter does not exist.
672 public String getValue(String parameter) {
673 return mEntries.get(parameter);
677 * Register a value sanitizer for a particular parameter. Can also be used
680 * Registering a non-null value sanitizer for a particular parameter
681 * makes that parameter a registered parameter.
682 * @param parameter an unencoded parameter name
684 * parameter. May be null in order to unregister that parameter.
687 public void registerParameter(String parameter,
690 mSanitizers.remove(parameter);
692 mSanitizers.put(parameter, valueSanitizer);
697 * @param parameters An array of unencoded parameter names.
733 * Set whether or not the first occurrence of a repeated parameter is
734 * preferred. True means the first repeated parameter is preferred.
735 * False means that the last repeated parameter is preferred.
737 * The preferred parameter is the one that is returned when getParameter
742 * parameter is preferred.
751 * Get whether or not the first occurrence of a repeated parameter is
753 * @return true if the first occurrence of a repeated parameter is
762 * Parse an escaped parameter-value pair. The default implementation
763 * unescapes both the parameter and the value, then looks up the
764 * effective value sanitizer for the parameter and uses it to sanitize
766 * the unescaped parameter and the sanitized unescaped value.
767 * @param parameter an escaped parameter
770 protected void parseEntry(String parameter, String value) {
771 String unescapedParameter = unescape(parameter);
784 * Record a sanitized parameter-value pair. Override if you want to
786 * @param parameter an unescaped parameter
789 protected void addSanitizedEntry(String parameter, String value) {
791 new ParameterValuePair(parameter, value));
793 if (mEntries.containsKey(parameter)) {
797 mEntries.put(parameter, value);
801 * Get the value sanitizer for a parameter. Returns null if there
802 * is no value sanitizer registered for the parameter.
803 * @param parameter the unescaped parameter
804 * @return the currently registered value sanitizer for this parameter.
807 public ValueSanitizer getValueSanitizer(String parameter) {
808 return mSanitizers.get(parameter);
812 * Get the effective value sanitizer for a parameter. Like getValueSanitizer,
813 * except if there is no value sanitizer registered for a parameter, and
816 * @param parameter an unescaped parameter
817 * @return the effective value sanitizer for a parameter.
819 public ValueSanitizer getEffectiveValueSanitizer(String parameter) {
820 ValueSanitizer sanitizer = getValueSanitizer(parameter);