|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfaa.tg.radix.ARadix
public class ARadix
ARadix is an abstract base class for converting numbers of a different radix. A different derived class is created for each kind of use Classes derived from ARadix are used to set and get values of classes derived from ARadixUnit descendants. This provides type safety in that mixing different types of radix would not be allowed. These classes are shamelessly borrowed from the Units package See the source: ARadix.java
| Field Summary | |
|---|---|
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID |
(package private) java.lang.String |
itsAbbr
|
(package private) int |
itsBase
|
(package private) java.lang.String |
itsName
|
(package private) static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
protected |
ARadix(int theValue,
java.lang.String fullName,
java.lang.String shortName)
This constructor specifies a base other then base 10. |
protected |
ARadix(java.lang.String fullName,
java.lang.String shortName)
This constructor specifies numbers in base 10. |
| Method Summary | |
|---|---|
java.lang.String |
abbr()
Returns the abbreviation of the units this class specifies |
java.lang.String |
convertFromBase(int theValue)
Takes a value in canonical units and returns the value in units described by this class. |
java.lang.String |
convertToBase(int theValue)
Takes a value in the units described by this class and returns the value in canonical units. |
java.lang.String |
name()
Returns the name of the units this class specifies |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
public static final java.lang.String CVS_VERSION_ID
int itsBase
java.lang.String itsName
java.lang.String itsAbbr
| Constructor Detail |
|---|
protected ARadix(java.lang.String fullName,
java.lang.String shortName)
fullName - the full name of the radix (ex. "octal")shortName - the abbreviated name of the radix (ex. "oct)
protected ARadix(int theValue,
java.lang.String fullName,
java.lang.String shortName)
theValue - value of new base in terms of specified radixfullName - the full name of the radix (ex. "octal")shortName - the abbreviated name of the radix (ex. "oct")| Method Detail |
|---|
public java.lang.String convertToBase(int theValue)
theValue - a value in units of this class
public java.lang.String convertFromBase(int theValue)
theValue - a value in canonical units
public java.lang.String name()
public java.lang.String abbr()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||