ontea.core
Class Result
java.lang.Object
ontea.core.Result
- Direct Known Subclasses:
- ResultRegExp
public class Result
- extends java.lang.Object
Represent result created by pattern based annotation or result transformed using transformers from ontea.transform package
- Author:
- Michal Laclavik
Constructor Summary |
Result(java.lang.String _individual,
java.lang.String _type,
Pattern _pattern)
Creates result instance based on individual string representation, type of individual and pattern which created this individual |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
individual
java.lang.String individual
type
java.lang.String type
pattern
Pattern pattern
relevance
java.lang.Float relevance
Result
public Result(java.lang.String _individual,
java.lang.String _type,
Pattern _pattern)
- Creates result instance based on individual string representation, type of individual and pattern which created this individual
- Parameters:
_individual
- string representation of an individual_type
- class or type of an individual_pattern
- pattern which has created an individual
getIndividual
public java.lang.String getIndividual()
setIndividual
public void setIndividual(java.lang.String _individual)
getPattern
public Pattern getPattern()
getType
public java.lang.String getType()
getRelevance
public java.lang.Float getRelevance()
setRelevance
public void setRelevance(java.lang.Float _relevance)
equals
public boolean equals(java.lang.Object r)
- Two results are considered as same if individual string and type are same. This method is implemented to have
only one result in the set
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object