Class SuffixField

    • Constructor Detail

      • SuffixField

        public SuffixField()
        Constructor. Sets the name to null and the type to UNKNOWN.
      • SuffixField

        public SuffixField​(AbstractField field)
        Uses the values from the given field.
        Parameters:
        field - the field to use as basis
      • SuffixField

        public SuffixField​(String name,
                           DataType dt)
        Constructor.
        Parameters:
        name - the name of the field
        dt - the type of the field
    • Method Detail

      • compareTo

        public int compareTo​(Object o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Specified by:
        compareTo in interface Comparable
        Overrides:
        compareTo in class AbstractField
        Parameters:
        o - the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Throws:
        ClassCastException - if the specified object's type prevents it from being compared to this object.
      • toString

        public String toString()
        Returns the prefix of the field.
        Overrides:
        toString in class AbstractField
        Returns:
        the prefix
      • newField

        public AbstractField newField​(String name,
                                      DataType dtype)
        Returns a new field.
        Overrides:
        newField in class Field
        Parameters:
        name - the name of the field
        dtype - the data type of the field
        Returns:
        the new field
      • parseField

        public static SuffixField parseField​(String s)
        Parses the given string and returns the field. The type of the field can be append with parentheses: name[type]. Otherwise, UNKNOWN is used as type.
        Parameters:
        s - the string to parse
        Returns:
        the parsed field