Mercurial > hg > blitz_stable
view src/org/dancres/blitz/oid/OIDFactory.java @ 8:fa7203ea1622
Remove some dead code (Dave Brosius)
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Sat, 23 May 2009 11:27:41 +0100 |
parents | 3dc0c5604566 |
children |
line wrap: on
line source
package org.dancres.blitz.oid; /** <p>Provides the means by which to reconstitute an OID from it's constituent parts.</p> <p>This class will change some when we introduce a node id as will the OID interface. Likely as not, all marshalling and unmarshalling will move into this class and need to introduce a type identifier as part of the marshalling to make sure we return the appropriate concrete implementation class.</p> */ public class OIDFactory { public static final int KEY_SIZE = UIDImpl.KEY_SIZE; public static OID newOID(int aZoneId, long anId) { return new UIDImpl(aZoneId, anId); } public static OID newOID(byte[] aKey) { return new UIDImpl(aKey); } public static byte[] getKey(OID anOID) { return ((UIDImpl) anOID).getKey(); } }