Class KeyValue

java.lang.Object
nz.org.riskscape.ini.KeyValue

public class KeyValue extends Object

AST for A single key-value defined in an .ini file, e.g. foo = bar

  • Constructor Details

    • KeyValue

      public KeyValue(Token key, Token value)
  • Method Details

    • getKey

      public String getKey()
      Returns:
      the key part, i.e. the bit before the equals sign.
    • getKeyToken

      public Token getKeyToken()
      Returns:
      the AST of the key
    • getValue

      public String getValue()
      Returns:
      the defined value. Might be a blank string, but leading and trailing whitespace should be removed.
    • getValueToken

      public Token getValueToken()
      Returns:
      the AST of the value
    • isBlank

      public boolean isBlank()
      Returns:
      true if the value is just whitespace or empty.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object