Skip to content

Instantly share code, notes, and snippets.

@jfinkels
Created January 13, 2010 18:31
Show Gist options
  • Save jfinkels/276433 to your computer and use it in GitHub Desktop.
Save jfinkels/276433 to your computer and use it in GitHub Desktop.
Factory<Byte> bitFactory = new BitFactory();
int length = 20;
Factory<DeepCopyableList<Byte>> individualFactory = new PartialDeepCopyableListFactory<Byte>();
individualFactory.setElementFactory(bitFactory);
individualFactory.setSize(length);
try {
DeepCopyableList<Byte> individual = individualFactory.createObject();
} catch (InitializationException exception) {
// handle the exception
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment