Package gnu.mapping
Class LazyPropertyKey<T>
- java.lang.Object
-
- gnu.mapping.PropertyKey<T>
-
- gnu.mapping.LazyPropertyKey<T>
-
public class LazyPropertyKey<T> extends PropertyKey<T>
A property whose value can be found lazily. The property is initialized with a specifier string, which must have the form of either:-
"ClassName:fieldName": In this case"fieldName"must be the name of a static field in"ClassName", of typeT. -
"*ClassName:methodName": In this case"methodName"must be the name of a static method that takes one parameter (thePropertySet), and returns an object of typeT.
-
-
-
Constructor Summary
Constructors Constructor Description LazyPropertyKey(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tget(PropertySet container, T defaultValue)Get the value associated with this key in a givenPropertySet.voidset(PropertySet container, String specifier)-
Methods inherited from class gnu.mapping.PropertyKey
get, set
-
-
-
-
Constructor Detail
-
LazyPropertyKey
public LazyPropertyKey(String name)
-
-
Method Detail
-
get
public T get(PropertySet container, T defaultValue)
Description copied from class:PropertyKeyGet the value associated with this key in a givenPropertySet. ReturndefaultValueif there is no association for this key.- Overrides:
getin classPropertyKey<T>
-
set
public void set(PropertySet container, String specifier)
-
-