com.sun.electric.database.geometry.btree.unboxed
Class UnboxedInt

java.lang.Object
  extended by com.sun.electric.database.geometry.btree.unboxed.UnboxedInt
All Implemented Interfaces:
Unboxed<java.lang.Integer>, UnboxedComparable<java.lang.Integer>

public class UnboxedInt
extends java.lang.Object
implements UnboxedComparable<java.lang.Integer>

A 32-bit int in unboxed form


Field Summary
static UnboxedInt instance
           
 
Constructor Summary
UnboxedInt()
           
 
Method Summary
 int compare(byte[] buf1, int ofs1, byte[] buf2, int ofs2)
          Same as Comparable.compare(), but operates directly on serialized representation
 java.lang.Integer deserialize(byte[] buf, int ofs)
          Deserialize a value; need not be compatible with V.readObject()!
 int deserializeInt(byte[] buf, int ofs)
           
 int getSize()
          Return the size, in bytes, of a value; all values must have the same size
 void serialize(java.lang.Integer k, byte[] buf, int ofs)
          Serialize a value; need not be compatible with V.writeObject()!
 void serializeInt(int i, byte[] buf, int ofs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static final UnboxedInt instance
Constructor Detail

UnboxedInt

public UnboxedInt()
Method Detail

getSize

public int getSize()
Description copied from interface: Unboxed
Return the size, in bytes, of a value; all values must have the same size

Specified by:
getSize in interface Unboxed<java.lang.Integer>

deserialize

public java.lang.Integer deserialize(byte[] buf,
                                     int ofs)
Description copied from interface: Unboxed
Deserialize a value; need not be compatible with V.readObject()!

Specified by:
deserialize in interface Unboxed<java.lang.Integer>

serialize

public void serialize(java.lang.Integer k,
                      byte[] buf,
                      int ofs)
Description copied from interface: Unboxed
Serialize a value; need not be compatible with V.writeObject()!

Specified by:
serialize in interface Unboxed<java.lang.Integer>

deserializeInt

public int deserializeInt(byte[] buf,
                          int ofs)

serializeInt

public void serializeInt(int i,
                         byte[] buf,
                         int ofs)

compare

public int compare(byte[] buf1,
                   int ofs1,
                   byte[] buf2,
                   int ofs2)
Description copied from interface: UnboxedComparable
Same as Comparable.compare(), but operates directly on serialized representation

Specified by:
compare in interface UnboxedComparable<java.lang.Integer>