|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.phoenix_int.aserver.types.PHXSimpleType
com.phoenix_int.aserver.types.PHXDouble
public class PHXDouble
The Phoenix type for doubles. This class adds the following features to the PHXSimpleType:
PHXSimpleType| Constructor Summary | |
|---|---|
PHXDouble()
initializes value to zero without upper or lower bounds |
|
| Method Summary | |
|---|---|
static java.lang.String |
arrayToString(double[] sa)
|
void |
fromString(java.lang.String value)
converts a String representation to the internal value |
void |
fromString2(PHXStringBuffer value)
converts a PHXStringBuffer representation to the internal value |
java.lang.String[] |
getEnumAliases()
An interface function for the enumeration array |
java.lang.String |
getEnumAliasesStr()
An interface function for the enumeration array |
double[] |
getEnumValues()
An interface function for the enumeration array |
java.lang.String |
getEnumValuesStr()
Interface function to pass out the enumeration array as a comma separated string |
java.lang.String |
getFormat()
Get the format string for the variable |
boolean |
getHasLowerBound()
retrieves the hasLowerBound flag |
boolean |
getHasUpperBound()
retrieves the hasUpperBound flag |
double |
getLowerBound()
retrieves the current lower bound value |
double |
getUpperBound()
retrieves the current upper bound value |
double |
getValue()
retrieves the current value of the variable |
java.lang.String |
getValueStr()
retrieves the string value of this variable as passed into the last call to fromString(). |
boolean |
hasFormat()
Whether or not the variable has a format |
void |
setEnumAliases(java.lang.String values)
takes a comma seperated string of values and fills the enumeration aliases list with values. |
void |
setEnumAliases(java.lang.String[] values)
Sets the enumeration aliases list |
void |
setEnumValues(double[] values)
Sets the enumeration list of valid values. |
void |
setEnumValues(java.lang.String values)
takes a comma seperated string of values and fills the enumeration List with values. |
void |
setFormat(java.lang.String format)
Set the format string for the variable |
void |
setHasLowerBound(boolean value)
sets the hasLowerBound flag |
void |
setHasUpperBound(boolean value)
sets the hasUpperBound flag |
void |
setIgnoreConversionErrors(boolean ignoreConversionErrors)
indicates whether the object should accept bad values in the fromString() method without throwning an exception. |
void |
setLowerBound(double value)
sets the lower bound. |
void |
setLowerBound(java.lang.String value)
|
void |
setUpperBound(double value)
sets the upper bound. |
void |
setUpperBound(java.lang.String value)
|
void |
setValue(double v)
sets the value for the variable |
java.lang.String |
toString()
converts the variable to a string |
java.lang.String |
toString(int width)
Converts the value to a string with the best possible formatting, e.g. |
PHXStringBuffer |
toString2()
converts the variable to a PHXStringBuffer |
| Methods inherited from class com.phoenix_int.aserver.types.PHXSimpleType |
|---|
addPropertyChangeListener, getDescription, getEnumTokens, getHasChanged, getUnits, removePropertyChangeListener, setDescription, setHasChanged, setUnits |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PHXDouble()
| Method Detail |
|---|
public double getValue()
public java.lang.String getValueStr()
public void setValue(double v)
v - the valuepublic void setUpperBound(double value)
value - the upper boundpublic void setUpperBound(java.lang.String value)
public double getUpperBound()
public void setLowerBound(double value)
value - the lower boundpublic void setLowerBound(java.lang.String value)
public double getLowerBound()
public void setHasUpperBound(boolean value)
value - true or falsepublic boolean getHasUpperBound()
public void setHasLowerBound(boolean value)
value - true or falsepublic boolean getHasLowerBound()
public PHXStringBuffer toString2()
toString2 in interface IPHXType2public java.lang.String toString()
toString in interface IPHXTypetoString in class java.lang.Objectpublic void fromString2(PHXStringBuffer value)
fromString2 in interface IPHXType2value - the value to convertpublic void fromString(java.lang.String value)
fromString in interface IPHXTypevalue - the value to convert
public java.lang.String toString(int width)
throws PHXNumberFormatException
width - the number of characters print to
PHXNumberFormatExceptionpublic void setIgnoreConversionErrors(boolean ignoreConversionErrors)
ignoreConversionErrors - true if errors should be ignoredpublic void setEnumValues(java.lang.String values)
values - A comma seperrated string of enumeration valuespublic void setEnumValues(double[] values)
values - An array of double valuespublic double[] getEnumValues()
public java.lang.String getEnumValuesStr()
public void setEnumAliases(java.lang.String values)
values - A comma seperated string of enumeration aliasespublic void setEnumAliases(java.lang.String[] values)
values - An array of stringspublic java.lang.String[] getEnumAliases()
public java.lang.String getEnumAliasesStr()
public void setFormat(java.lang.String format)
setFormat in interface IPHXFormatformat - format stringpublic java.lang.String getFormat()
getFormat in interface IPHXFormatpublic boolean hasFormat()
hasFormat in interface IPHXFormatpublic static java.lang.String arrayToString(double[] sa)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||