Package au.csiro.pathling.utilities
Class ObjectHolder.SingletonHolder<C extends Serializable,V>
- java.lang.Object
-
- au.csiro.pathling.utilities.ObjectHolder.SingletonHolder<C,V>
-
- All Implemented Interfaces:
ObjectHolder<C,V>
- Enclosing interface:
- ObjectHolder<C extends Serializable,V>
public static class ObjectHolder.SingletonHolder<C extends Serializable,V> extends Object implements ObjectHolder<C,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface au.csiro.pathling.utilities.ObjectHolder
ObjectHolder.SingletonHolder<C extends Serializable,V>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VgetOrCreate(C config)Retrieves the instance associated with given configuration and if necessary creates ones.voidreset()Destroys all the instances stored the underlying scope.
-
-
-
Method Detail
-
getOrCreate
@Nonnull public V getOrCreate(@Nonnull C config)
Description copied from interface:ObjectHolderRetrieves the instance associated with given configuration and if necessary creates ones.- Specified by:
getOrCreatein interfaceObjectHolder<C extends Serializable,V>- Parameters:
config- the configuration for the instance.- Returns:
- the instance associated with the holder.
-
reset
public void reset()
Description copied from interface:ObjectHolderDestroys all the instances stored the underlying scope.- Specified by:
resetin interfaceObjectHolder<C extends Serializable,V>
-
-