org.gcube.data.trees.patterns
Class DatePattern

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

public final class DatePattern
extends LeafPattern<Date,Constraint<? super Date>>

A Pattern that matches the value of Leafs against given Date Constraint.

Author:
Fabio Simeoni
See Also:
Serialized Form

Field Summary
static DateFormat ISO8601formatter
          Formatter for ISO8601.
 
Fields inherited from class org.gcube.data.trees.patterns.LeafPattern
constraint
 
Constructor Summary
DatePattern(Constraint<? super Date> c)
          Creates an instance with a given constraint.
 
Method Summary
 String name()
          Returns the name of the pattern.
protected  Date 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
 

Field Detail

ISO8601formatter

public static DateFormat ISO8601formatter
Formatter for ISO8601.

Constructor Detail

DatePattern

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

Parameters:
c - the constraint
Method Detail

valueOf

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

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

name

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

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


Copyright © 2012. All Rights Reserved.