|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectus.zuercher.gpx2map.source.MapSourcePropertyChoice
public class MapSourcePropertyChoice
MapPropertyChoice represents a choice for a map source property value. Property choices have a value and a display name.
Field Summary | |
---|---|
private String |
displayName
Property choice display name. |
private boolean |
isDouble
Property choice is a double value. |
private boolean |
isInteger
Property choice is an integer value. |
private String |
value
Property choice value. |
Constructor Summary | |
---|---|
MapSourcePropertyChoice(String displayName,
double value)
Constructs a new MapPropertyChoice with the given display name and value. |
|
MapSourcePropertyChoice(String displayName,
int value)
Constructs a new MapPropertyChoice with the given display name and value. |
|
MapSourcePropertyChoice(String displayName,
String value)
Constructs a new MapPropertyChoice with the given display name and value. |
Method Summary | |
---|---|
boolean |
equals(Object other)
Compares two choices for equality by value. |
String |
getValue()
Returns this choice's value. |
boolean |
matches(String userInput)
Returns true if this choice matches the user's input. |
String |
toString()
Returns this choice's display name. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final String displayName
private final String value
private final boolean isInteger
private final boolean isDouble
Constructor Detail |
---|
public MapSourcePropertyChoice(String displayName, String value)
displayName
- choice's display namevalue
- choice's valuepublic MapSourcePropertyChoice(String displayName, double value)
displayName
- choice's display namevalue
- choice's valuepublic MapSourcePropertyChoice(String displayName, int value)
displayName
- choice's display namevalue
- choice's valueMethod Detail |
---|
public String toString()
toString
in class Object
public String getValue()
public boolean matches(String userInput)
String.equals(Object)
. If this choice was constructed
with a numeric value, the user's input must be equal after conversion
to the appropriate type (int
or double
.).
userInput
- the user's input
public boolean equals(Object other)
equals
in class Object
other
- another MapPropertyChoice
ClassCastException
- if other is not a MapPropertyChoice
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |