Package db

Class IntField

  • All Implemented Interfaces:
    java.lang.Comparable<Field>

    public class IntField
    extends Field
    IntField provides a wrapper for 4-byte signed integer data which is read or written to a Record.
    • Constructor Detail

      • IntField

        public IntField()
        Construct an integer field with an initial value of 0.
      • IntField

        public IntField​(int i)
        Construct an integer field with an initial value of i.
        Parameters:
        i - initial value
    • Method Detail

      • getIntValue

        public int getIntValue()
        Description copied from class: Field
        Get field as an integer value.
        Overrides:
        getIntValue in class Field
        Returns:
        integer value
        See Also:
        Field.getIntValue()
      • setIntValue

        public void setIntValue​(int value)
        Description copied from class: Field
        Set field's integer value.
        Overrides:
        setIntValue in class Field
        Parameters:
        value - integer value
        See Also:
        Field.setIntValue(int)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • getValueAsString

        public java.lang.String getValueAsString()
        Specified by:
        getValueAsString in class Field
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in class Field
        See Also:
        Object.equals(java.lang.Object)
      • compareTo

        public int compareTo​(Field o)
        See Also:
        Comparable.compareTo(java.lang.Object)
      • newField

        public Field newField()
        Description copied from class: Field
        Create new instance of this field type.
        Specified by:
        newField in class Field
        Returns:
        long
        See Also:
        Field.newField()
      • getLongValue

        public long getLongValue()
        Description copied from class: Field
        Get field as a long value. All fixed-length field objects must implement this method
        Overrides:
        getLongValue in class Field
        Returns:
        long value
        See Also:
        Field.getLongValue()
      • setLongValue

        public void setLongValue​(long value)
        Description copied from class: Field
        Set field's long value. All fixed-length field objects must implement this method
        Overrides:
        setLongValue in class Field
        Parameters:
        value - long value
        See Also:
        Field.setLongValue(long)
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in class Field
        See Also:
        Object.hashCode()