Class ConfELong

Object
com.tailf.proto.ConfEObject
com.tailf.proto.ConfELong
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ConfEByte, ConfEChar, ConfEInt, ConfEShort, ConfEUInt, ConfEUShort

public class ConfELong extends ConfEObject implements Serializable, Cloneable
Provides a Java representation of E integral types. E does not distinguish between different integral types, however this class and its subclasses ConfEByte, ConfEChar, ConfEInt, and ConfEShort attempt to map the E types onto the various Java integral types. Two additional classes, ConfEUInt and ConfEUShort are provided for Corba compatibility. See the documentation for IC for more information.
See Also:
  • Constructor Details

    • ConfELong

      public ConfELong(long l)
      Create an E integer from the given value.
      Parameters:
      l - the long value to use.
    • ConfELong

      public ConfELong(ConfInputStream buf) throws ConfEDecodeException
      Create an E integer from a stream containing an integer encoded in E external format.
      Parameters:
      buf - the stream containing the encoded value.
      Throws:
      ConfEDecodeException - if the buffer does not contain a valid external representation of an E integer.
  • Method Details

    • longValue

      public long longValue()
      Get this number as a long.
      Returns:
      the value of this number, as a long.
    • intValue

      public int intValue() throws ConfERangeException
      Get this number as an int.
      Returns:
      the value of this number, as an int.
      Throws:
      ConfERangeException - if the value is too large to be represented as an int.
    • uIntValue

      public int uIntValue() throws ConfERangeException
      Get this number as a non-negative int.
      Returns:
      the value of this number, as an int.
      Throws:
      ConfERangeException - if the value is too large to be represented as an int, or if the value is negative.
    • shortValue

      public short shortValue() throws ConfERangeException
      Get this number as a short.
      Returns:
      the value of this number, as a short.
      Throws:
      ConfERangeException - if the value is too large to be represented as a short.
    • uShortValue

      public short uShortValue() throws ConfERangeException
      Get this number as a non-negative short.
      Returns:
      the value of this number, as a short.
      Throws:
      ConfERangeException - if the value is too large to be represented as a short, or if the value is negative.
    • charValue

      public char charValue() throws ConfERangeException
      Get this number as a char.
      Returns:
      the char value of this number.
      Throws:
      ConfERangeException - if the value is too large to be represented as a char.
    • byteValue

      public byte byteValue() throws ConfERangeException
      Get this number as a byte.
      Returns:
      the byte value of this number.
      Throws:
      ConfERangeException - if the value is too large to be represented as a byte.
    • toString

      public String toString()
      Get the string representation of this number.
      Specified by:
      toString in class ConfEObject
      Returns:
      the string representation of this number.
    • encode

      public void encode(ConfOutputStream buf)
      Convert this number to the equivalent E external representation.
      Specified by:
      encode in class ConfEObject
      Parameters:
      buf - an output stream to which the encoded number should be written.
    • equals

      public boolean equals(Object o)
      Determine if two numbers are equal. Numbers are equal if they contain the same value.
      Specified by:
      equals in class ConfEObject
      Parameters:
      o - the number to compare to.
      Returns:
      true if the numbers have the same value.