com.lizardtech.djvu
Class BitContext

java.lang.Object
  extended by java.lang.Number
      extended by com.lizardtech.djvu.BitContext
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class BitContext
extends java.lang.Number
implements java.lang.Cloneable

This class impliments a mutable Byte type class. The byte is reported in the range of 0 to 255.

Version:
$Revision: 1.6 $
Author:
Bill C. Riemers
See Also:
Serialized Form

Field Summary
 byte bit
          The raw value.
 
Constructor Summary
BitContext()
          Creates a new BitContext object.
BitContext(short s)
          Creates a new BitContext object.
 
Method Summary
 byte byteValue()
          Query the raw byte value.
 java.lang.Object clone()
          Clone this object.
 double doubleValue()
          Query the double value.
 float floatValue()
          Query the float value.
 int intValue()
          Query the integer value.
 long longValue()
          Query the long value.
 void set(int value)
          Set the byte value.
 void set(java.lang.Number value)
          Set the byte value from a Number object.
 short shortValue()
          Query the short value.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bit

public byte bit
The raw value. Try to use the methods, unless speed is of the essence.

Constructor Detail

BitContext

public BitContext()
Creates a new BitContext object.


BitContext

public BitContext(short s)
Creates a new BitContext object.

Parameters:
s - DOCUMENT ME!
Method Detail

byteValue

public final byte byteValue()
Query the raw byte value.

Overrides:
byteValue in class java.lang.Number
Returns:
the raw byte value

clone

public java.lang.Object clone()
Clone this object.

Overrides:
clone in class java.lang.Object
Returns:
the newly created clone

doubleValue

public final double doubleValue()
Query the double value.

Specified by:
doubleValue in class java.lang.Number
Returns:
(double)intValue()

floatValue

public final float floatValue()
Query the float value.

Specified by:
floatValue in class java.lang.Number
Returns:
(float)intValue()

intValue

public final int intValue()
Query the integer value.

Specified by:
intValue in class java.lang.Number
Returns:
the byte value ranged 0 to 255

longValue

public final long longValue()
Query the long value.

Specified by:
longValue in class java.lang.Number
Returns:
the byte value ranged 0L to 255L

set

public final void set(int value)
Set the byte value.

Parameters:
value - the raw value to set

set

public final void set(java.lang.Number value)
Set the byte value from a Number object.

Parameters:
value - the raw value to set

shortValue

public final short shortValue()
Query the short value.

Overrides:
shortValue in class java.lang.Number
Returns:
the byte value ranged 0 to 255