|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.vo.ValueConverter
public abstract class ValueConverter
Provides some way of converting a string value into a numeric. A number of useful subclasses are provided.
Nested Class Summary | |
---|---|
static class |
ValueConverter.DMSDegreesValueConverter
Converter for degrees:minutes:seconds format. |
static class |
ValueConverter.HMSDegreesValueConverter
Converter for hours:minute:seconds format. |
static class |
ValueConverter.UnitValueConverter
ValueConverter class which scales by a given factor (represents a particular unit). |
Constructor Summary | |
---|---|
ValueConverter(String name)
Constructor. |
Method Summary | |
---|---|
abstract double |
convertValue(String sval)
Converts a string value to a numeric for this format |
String |
getName()
Returns format name. |
String |
toString()
|
abstract String |
unconvertValue(double dval)
Converts a numeric value to a string value for this format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ValueConverter(String name)
name
- format name (suitable for display in a combo box)Method Detail |
---|
public abstract double convertValue(String sval)
sval
- string value
IllegalArgumentException
- if sval doesn't make
sense to this converterpublic abstract String unconvertValue(double dval)
dval
- numeric value
public String getName()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |