com.bericotech.clavin.extractor
Class LocationOccurrence

java.lang.Object
  extended by com.bericotech.clavin.extractor.LocationOccurrence

public class LocationOccurrence
extends Object

Container class representing a location name found in a document. Stores the text of the location name itself, as well as its position in the text in which it was found (measured in UTF-16 code points from the start of the document).


Field Summary
 int position
           
 String text
           
 
Constructor Summary
LocationOccurrence(String text, int position)
          Sole construction for LocationOccurrence class.
 
Method Summary
 boolean equals(Object o)
          Tests equivalence based on name and position.
 int hashCode()
          Required for hashing.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

text

public final String text

position

public final int position
Constructor Detail

LocationOccurrence

public LocationOccurrence(String text,
                          int position)
Sole construction for LocationOccurrence class. Represents a location name found in a document.

Parameters:
text - text of the location name
position - where it was found
Method Detail

equals

public boolean equals(Object o)
Tests equivalence based on name and position.

Overrides:
equals in class Object
Parameters:
o - Object to compare this against

hashCode

public int hashCode()
Required for hashing.

Overrides:
hashCode in class Object


Copyright © 2013 Berico Technologies. All rights reserved.