Package snap.web

Class ParsedUrlArgs

java.lang.Object
snap.web.ParsedUrlArgs

public class ParsedUrlArgs extends Object
A class for working with parameter strings as found in a URL query part or fragment id, typically with the format: field1=value1&field2=value2
  • Constructor Details

    • ParsedUrlArgs

      public ParsedUrlArgs(String aString)
      Constructor for given string.
  • Method Details

    • getString

      public String getString()
      Returns the string.
    • createString

      protected String createString()
      Creates the string from fields/values.
    • getValue

      public String getValue(int anIndex)
      Returns the individual value at given index.
    • getFields

      public List<String> getFields()
      Returns the fields list.
    • getFieldIndex

      public int getFieldIndex(String aName)
      Returns a field index for given field string.
    • getValue

      public String getValue(String aFieldName)
      Returns a field value string for given field string.
    • setValue

      public ParsedUrlArgs setValue(String aFieldName, Object aValue)
      Sets a field value for given field name and value.
    • loadFields

      protected void loadFields()
      Creates the fields list.
    • toString

      public String toString()
      Standard toString implementation.
      Overrides:
      toString in class Object