com.sun.electric.database.geometry.btree.unboxed
Class UnboxedPair<A extends java.io.Serializable,B extends java.io.Serializable>

java.lang.Object
  extended by com.sun.electric.database.geometry.btree.unboxed.UnboxedPair<A,B>
All Implemented Interfaces:
Unboxed<Pair<A,B>>
Direct Known Subclasses:
UnboxedMinMaxHalfDouble

public class UnboxedPair<A extends java.io.Serializable,B extends java.io.Serializable>
extends java.lang.Object
implements Unboxed<Pair<A,B>>

an implementation of Pair in unboxed form


Constructor Summary
UnboxedPair(Unboxed<A> ua, Unboxed<B> ub)
           
 
Method Summary
 Pair<A,B> deserialize(byte[] buf, int ofs)
          Deserialize a value; need not be compatible with V.readObject()!
 int getSize()
          Return the size, in bytes, of a value; all values must have the same size
 void serialize(Pair<A,B> sme, byte[] buf, int ofs)
          Serialize a value; need not be compatible with V.writeObject()!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnboxedPair

public UnboxedPair(Unboxed<A> ua,
                   Unboxed<B> ub)
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<Pair<A extends java.io.Serializable,B extends java.io.Serializable>>

deserialize

public Pair<A,B> 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<Pair<A extends java.io.Serializable,B extends java.io.Serializable>>

serialize

public void serialize(Pair<A,B> sme,
                      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<Pair<A extends java.io.Serializable,B extends java.io.Serializable>>