public class LevelImpl extends java.lang.Object implements Level, java.io.Serializable
Constructor and Description |
---|
LevelImpl(java.lang.String n,
int val) |
LevelImpl(java.lang.String n,
java.lang.String val,
LevelFactory lf) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Level o)
Compares this object with the specified object for order.
|
static int |
evaluate(java.lang.String expr,
LevelFactory lf)
It analyzes a string expression to obtain its integer value.
|
int |
getIntValue()
Returns the integer value which represents the level.
|
java.lang.String |
getName()
It retrieves the name of the Level
|
java.lang.String |
getStringValue()
It retrieves the string expression of the level.
|
int |
hashCode()
It retrieves the integer value of the level.
|
boolean |
isComparableWith(Level o)
This method returns true is the current level and the Level parameter are
ordered.
|
void |
setName(java.lang.String n)
It assigns the name of the Level
|
java.lang.String |
toString() |
public LevelImpl(java.lang.String n, int val)
public LevelImpl(java.lang.String n, java.lang.String val, LevelFactory lf)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getStringValue()
public static int evaluate(java.lang.String expr, LevelFactory lf)
expr
- is the string expression which must be evaluated.lf
- is the LevelFactory which permits to obtain the referenced level.public java.lang.String toString()
toString
in class java.lang.Object
public boolean isComparableWith(Level o)
Level
isComparableWith
in interface Level
public int compareTo(Level o)
Level
public int getIntValue()
Level
getIntValue
in interface Level
public java.lang.String getName()
Level