edu.columbia.cs.ref.model.pattern
Class Pattern<T extends Matchable,D extends Document>
java.lang.Object
edu.columbia.cs.ref.model.pattern.Pattern<T,D>
- Type Parameters:
T
- the type of result produced by the matchD
- the type of document in which there can be a match
- Direct Known Subclasses:
- ExtractionPattern, SearchPattern, SimpleAttributeExtractionPattern
public abstract class Pattern<T extends Matchable,D extends Document>
- extends java.lang.Object
A Pattern represents any object that can be matched in a given document.
A Pattern is parameterized by two types. The first is the type of result produced
by the match and the second is the type of document in which the pattern can be
applied.
- Since:
- 2011-09-27
- Version:
- 0.1
- Author:
- Pablo Barrio, Goncalo Simoes
Method Summary |
boolean |
equals(java.lang.Object obj)
|
abstract java.util.List<T> |
findMatch(D d)
Abstract method that finds all matches in the input document |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Pattern
public Pattern()
findMatch
public abstract java.util.List<T> findMatch(D d)
- Abstract method that finds all matches in the input document
- Parameters:
d
- the document where we are looking for the matches
- Returns:
- the matched objects in document d
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object