Class IntReadField

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

    public class IntReadField
    extends ReadField
    A read field whose value is an int type.
    • Field Detail

      • value

        private final int value
    • Constructor Detail

      • IntReadField

        public IntReadField​(SerializableField field,
                            int value)
        Construct a new instance.
        Parameters:
        field - the serializable field
        value - the value
      • IntReadField

        public IntReadField​(SerializableField field)
        Construct a new instance with the default value.
        Parameters:
        field - the serializable field
    • Method Detail

      • getKind

        public Kind getKind()
        Get the kind of field represented by this object.
        Specified by:
        getKind in class ReadField
        Returns:
        the kind of field represented by this object
      • getInt

        public int getInt()
                   throws java.io.IOException
        Get the integer value of this field.
        Overrides:
        getInt in class ReadField
        Returns:
        the integer value of this field
        Throws:
        java.io.IOException - if the value cannot be read