V - The type of the object this attribute is mapping.public final class Attribute<V> extends Object implements GetsNamedValue<V>, SetsNamedValue<V>, Serializable
Attribute defines a String-based name (or key) and the type of a value which
the name maps to. This construct offers pseudo-typesafe handling where objects of arbitrary
types are retrieved by name and must be manually casted.GetsNamedValue.NotFound| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Optional<V> |
getFrom(Function<String,?> getter) |
int |
hashCode() |
void |
setOn(BiConsumer<String,? super V> setter,
V value) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetFrom, getName, requireFrom, requireFromsetOnpublic final String name
public Attribute(String name)
public void setOn(BiConsumer<String,? super V> setter, V value)
setOn in interface SetsNamedValue<V>public Optional<V> getFrom(Function<String,?> getter)
getFrom in interface GetsNamedValue<V>Copyright © 2016 Digipost. All rights reserved.