|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.data.trees.patterns.AbstractPattern
public abstract class AbstractPattern
Partial Pattern implementation.
Adds support for pattern for node identifiers.
| Constructor Summary | |
|---|---|
AbstractPattern()
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
int |
hashCode()
|
LeafPattern<?,?> |
idPattern()
Returns the pattern on the node identifier. |
boolean |
matches(Node node)
Indicates whether a node matches a pattern. |
void |
prune(Node node)
Prunes a node of all the descendants that are not required to match the pattern. |
void |
setIdPattern(LeafPattern<?,?> idp)
Set a predicate on the node identifier. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPattern()
| Method Detail |
|---|
public void setIdPattern(LeafPattern<?,?> idp)
idp - the pattern.public LeafPattern<?,?> idPattern()
public boolean matches(Node node)
Pattern
matches in interface Patternnode - the node.
true if it does, false otherwise.
public void prune(Node node)
throws Exception
Pattern
prune in interface Patternnode - the node.
Exception - if the node does not match the pattern.public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||