org.gcube.data.trees.patterns
Class AnyPattern
java.lang.Object
org.gcube.data.trees.patterns.AbstractPattern
org.gcube.data.trees.patterns.AnyPattern
- All Implemented Interfaces:
- Serializable, Pattern
public class AnyPattern
- extends AbstractPattern
A pattern that matches all Nodes.
- Author:
- Fabio Simeoni
- See Also:
- Serialized Form
|
Method Summary |
boolean |
matches(Node n)
Indicates whether a node matches a pattern. |
void |
prune(Node n)
Prunes a node of all the descendants that are not required to match the pattern. |
String |
toString()
|
AnyPattern
public AnyPattern()
matches
public boolean matches(Node n)
- Indicates whether a node matches a pattern.
- Specified by:
matches in interface Pattern- Overrides:
matches in class AbstractPattern
- Parameters:
n - the node.
- Returns:
true if it does, false otherwise.
prune
public void prune(Node n)
throws Exception
- Prunes a node of all the descendants that are not required to match the pattern.
- Specified by:
prune in interface Pattern- Overrides:
prune in class AbstractPattern
- Parameters:
n - the node.
- Throws:
Exception - if the node does not match the pattern.
toString
public String toString()
-
- Overrides:
toString in class Object
Copyright © 2012. All Rights Reserved.