Class Fields.Field

  • Enclosing class:
    Fields

    public static class Fields.Field
    extends java.lang.Object

    A named list of string values.

    The name is case-sensitive and there must be at least one value.

    • Constructor Summary

      Constructors 
      Constructor Description
      Field​(java.lang.String name, java.lang.String value)  
    • Constructor Detail

      • Field

        public Field​(java.lang.String name,
                     java.lang.String value)
    • Method Detail

      • equals

        public boolean equals​(Fields.Field that,
                              boolean caseSensitive)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getName

        public java.lang.String getName()
        Returns:
        the field's name
      • getValue

        public java.lang.String getValue()
        Returns:
        the first field's value
      • getValueAsInt

        public java.lang.Integer getValueAsInt()

        Attempts to convert the result of getValue() to an integer, returning it if the conversion is successful; returns null if the result of getValue() is null.

        Returns:
        the result of getValue() converted to an integer, or null
        Throws:
        java.lang.NumberFormatException - if the conversion fails
      • getValues

        public java.util.List<java.lang.String> getValues()
        Returns:
        the field's values
      • hasMultipleValues

        public boolean hasMultipleValues()
        Returns:
        whether the field has multiple values
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object