|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.whatswrong.TokenProperty
public class TokenProperty
A TokenProperty represents a property of a token, such as the 'Word' or "PoS-Tag' property. A Token then maps
such properties to property values, such as "house" or "NN". Each TokenProperty has a name (say 'Word') and an
integer 'level' that can be used to define an order on properties. This order is for example used when the properties
of a token are stacked under each other in the graphical representation of a token.
| Constructor Summary | |
|---|---|
TokenProperty(int level)
Creates a property with the given level and the name 'Property [level]' where [level] will be replaced with the given level. |
|
TokenProperty(String name)
Creates a property with the given name and level 0. |
|
TokenProperty(String name,
int level)
Create new property with given name and level. |
|
| Method Summary | |
|---|---|
int |
compareTo(TokenProperty o)
First compares the level of the two properties and if these are equal the property names are compared. |
boolean |
equals(Object o)
Two TokenProperty objects are equal iff their names match. |
int |
getLevel()
Returns the level of the property. |
String |
getName()
Returns the name of the property. |
int |
hashCode()
Calculates a hashcode based on the property name. |
String |
toString()
Returns the name of the property. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TokenProperty(String name,
int level)
name - the name of the property.level - the level of the property.public TokenProperty(String name)
name - the name of the property.public TokenProperty(int level)
level - the level of the property.| Method Detail |
|---|
public String toString()
toString in class Objectpublic String getName()
public int getLevel()
public boolean equals(Object o)
equals in class Objecto - the other property.
public int hashCode()
hashCode in class Objectpublic int compareTo(TokenProperty o)
compareTo in interface Comparable<TokenProperty>o - the other property.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||