E - the type of the instances to create; must implement the
Cloneable interfacepublic class PrototypeSupplier<E extends Cloneable> extends Object implements java.util.function.Supplier<E>
Supplier which creates instances following the
prototype pattern - i.e. clones a given prototype object.| Constructor and Description |
|---|
PrototypeSupplier(E prototype)
Generates a new instance from the given prototype object.
|
public PrototypeSupplier(E prototype)
Cloneable interface. Additionally it's
clone() method must be publicprototype - the prototype object to clone when instances should be createdpublic E get()
get in interface java.util.function.Supplier<E extends Cloneable>Copyright © 2017. All rights reserved.