ontea.core
Class Result

java.lang.Object
  extended by 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

Field Summary
(package private)  java.lang.String individual
           
(package private)  Pattern pattern
           
(package private)  java.lang.Float relevance
           
(package private)  java.lang.String type
           
 
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
 
Method Summary
 boolean equals(java.lang.Object r)
          Two results are considered as same if individual string and type are same.
 java.lang.String getIndividual()
           
 Pattern getPattern()
           
 java.lang.Float getRelevance()
           
 java.lang.String getType()
           
 int hashCode()
           
 void setIndividual(java.lang.String _individual)
           
 void setRelevance(java.lang.Float _relevance)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

individual

java.lang.String individual

type

java.lang.String type

pattern

Pattern pattern

relevance

java.lang.Float relevance
Constructor Detail

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
Method Detail

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