org.gcube.data.trees.patterns
Class TextPattern

java.lang.Object
  extended by org.gcube.data.trees.patterns.AbstractPattern
      extended by org.gcube.data.trees.patterns.LeafPattern<String,Constraint<? super String>>
          extended by org.gcube.data.trees.patterns.TextPattern
All Implemented Interfaces:
Serializable, Pattern

public class TextPattern
extends LeafPattern<String,Constraint<? super String>>

A Pattern that matches the text value of a Leaf against a given String Constraint.

Author:
Fabio Simeoni
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.gcube.data.trees.patterns.LeafPattern
constraint
 
Constructor Summary
TextPattern(Constraint<? super String> c)
          Creates an instance with a given constraint.
 
Method Summary
 String name()
          Returns the name of the pattern.
protected  String valueOf(String s)
          Returns the typed equivalent of a leaf's value.
 
Methods inherited from class org.gcube.data.trees.patterns.LeafPattern
constraint, equals, hashCode, matches, prune, toString
 
Methods inherited from class org.gcube.data.trees.patterns.AbstractPattern
idPattern, setIdPattern
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextPattern

public TextPattern(Constraint<? super String> c)
Creates an instance with a given constraint.

Parameters:
c - the constraint
Method Detail

valueOf

protected String valueOf(String s)
Returns the typed equivalent of a leaf's value.

Specified by:
valueOf in class LeafPattern<String,Constraint<? super String>>
Parameters:
s - the value
Returns:
the typed value

name

public String name()
Description copied from class: LeafPattern
Returns the name of the pattern.

Specified by:
name in class LeafPattern<String,Constraint<? super String>>
Returns:
the name


Copyright © 2012. All Rights Reserved.