Class FormatableLongHolder

java.lang.Object
org.apache.derby.iapi.services.io.FormatableLongHolder
All Implemented Interfaces:
Externalizable, Serializable, Formatable, TypedFormat

public class FormatableLongHolder extends Object implements Formatable
A formatable holder for an long.
See Also:
  • Field Details

    • theLong

      private long theLong
  • Constructor Details

    • FormatableLongHolder

      public FormatableLongHolder()
      Niladic constructor for formatable
    • FormatableLongHolder

      public FormatableLongHolder(long theLong)
      Construct a FormatableLongHolder using the input integer.
      Parameters:
      theLong - the long to hold
  • Method Details

    • setLong

      public void setLong(int theLong)
      Set the held long to the input int.
      Parameters:
      theLong - the int to hold
    • getLong

      public long getLong()
      Get the held int.
      Returns:
      The held int.
    • getFormatableLongHolders

      public static FormatableLongHolder[] getFormatableLongHolders(long[] theLongs)
      Create and return an array of FormatableLongHolders given an array of ints.
      Parameters:
      theLongs - The array of longs
      Returns:
      An array of FormatableLongHolders
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Write this formatable out
      Specified by:
      writeExternal in interface Externalizable
      Parameters:
      out - write bytes here
      Throws:
      IOException - thrown on error
    • readExternal

      public void readExternal(ObjectInput in) throws IOException
      Read this formatable from a stream of stored objects.
      Specified by:
      readExternal in interface Externalizable
      Parameters:
      in - read this.
      Throws:
      IOException - thrown on error
    • getTypeFormatId

      public int getTypeFormatId()
      Get the formatID which corresponds to this class.
      Specified by:
      getTypeFormatId in interface TypedFormat
      Returns:
      the formatID of this class