|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.contentmanagement.contentmanager.stubs.model.predicates.LeafPredicate<T,C>
C - the type of the constraint associated with the predicate.T - the type of the value constrained by the predicate.public abstract class LeafPredicate<T,C extends Constraint<? super T>>
Abstract implementation of Predicate for predicates that apply to Leafs.
| Constructor Summary | |
|---|---|
LeafPredicate(C c)
Creates and instance with a given constraint. |
|
| Method Summary | |
|---|---|
C |
constraint()
|
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
boolean |
matches(Node n)
Indicates whether a node matches a predicate. |
void |
prune(Node n)
Prunes a node of all the descendants that are not required to match the predicate. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LeafPredicate(C c)
c - the constraint.| Method Detail |
|---|
public final void prune(Node n)
throws java.lang.Exception
prune in interface Predicaten - the node.
java.lang.Exception - if the node does not match the predicate.public C constraint()
public boolean matches(Node n)
matches in interface Predicaten - the node.
true if it does, false otherwise.public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||