|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.graph.PredicateRegistry
public class PredicateRegistry
A registry where the lookup is done by matching predicates against a supplied object. Predicate mappings are kept in order and searched first to last when looking up values.
Nested Class Summary | |
---|---|
static class |
PredicateRegistry.PredicateMapping
A single entry that maps a predicate to an associated value. |
Constructor Summary | |
---|---|
PredicateRegistry()
Creates a new PredicateRegistry. |
|
PredicateRegistry(PredicateRegistry parent)
Creates a new PredicateRegistry that will delegate to the specified registry when a local match isn't found. |
Method Summary | |
---|---|
java.util.List |
getMappings()
Returns the list of mappings from Predicates to their respective values. |
PredicateRegistry |
getParentRegistry()
Returns a parent registry to which this registry will delegate when it doesn't find a local match. |
PredicateRegistry |
getRootRegistry()
Returns the root registry for this PredicateRegistry by traversing up the parentRegistry chain. |
java.lang.Object |
getValue(java.lang.Object search)
Returns the value associated with the first predicate that matches the specified search value. |
void |
setMappings(java.util.List mappings)
Sets the mappings from Predicates to their respective values. |
void |
setParentRegistry(PredicateRegistry parent)
Sets a parent registry to which this registry will delegate when it doesn't find a local match. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PredicateRegistry()
public PredicateRegistry(PredicateRegistry parent)
Method Detail |
---|
public void setMappings(java.util.List mappings)
public java.util.List getMappings()
public void setParentRegistry(PredicateRegistry parent)
public PredicateRegistry getParentRegistry()
public PredicateRegistry getRootRegistry()
public java.lang.Object getValue(java.lang.Object search)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |