|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdriver.ted.utilities.T_Converter
public class T_Converter
Title: T_Converter class Description: This class converts numbers from several formats into several formats Copyright: (c) 2002 - 2006
| Field Summary | |
|---|---|
static int |
BINARY
The designator for BINARY inputs and outputs. |
static int |
HEX
The designator for HEX inputs and outputs. |
static int |
INTEGER
The designator for INTEGER inputs and outputs. |
static int |
OCTAL
The designator for OCTAL inputs and outputs. |
| Constructor Summary | |
|---|---|
T_Converter()
Default constructor does nothing. |
|
| Method Summary | |
|---|---|
static java.lang.String |
getBinary(java.lang.String value,
int inputType,
int pad)
This function will accept a string and return a binary representation of the value supplied once converted to inputType. |
static java.lang.String |
getHex(java.lang.String value,
int inputType)
This function will accept a string and return a Hex representation of the value supplied once converted to inputType. |
static java.lang.String |
getInt(java.lang.String value,
int inputType)
This function will accept a string and return an Integer representation of the value supplied once converted to inputType. |
static java.lang.String |
getOctal(java.lang.String value,
int inputType)
This function will accept a string and return an octal representation of the value supplied once converted to inputType. |
static void |
main(java.lang.String[] args)
A program to provide the testing for the T_Converter class |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BINARY
public static final int OCTAL
public static final int INTEGER
public static final int HEX
| Constructor Detail |
|---|
public T_Converter()
| Method Detail |
|---|
public static java.lang.String getBinary(java.lang.String value,
int inputType,
int pad)
value - The value to convert to binaryinputType - One of the available fields in the class, specifying the
input typepad - An integer specifying how many digits to space in between numbers.
Use a value of zero (0) if no padding is required. pad will typically be 4
for hex representations, 3 for octal representations. A pad of 29 will designate that the
binary string will be padded for the 29 bit GPS Z-Count, placing a space between the 19th
and 20th LSBs to represent the Week and Time of Week.
public static java.lang.String getHex(java.lang.String value,
int inputType)
value - The value to convert to HexinputType - One of the available fields in the class, specifying the
input type
public static java.lang.String getInt(java.lang.String value,
int inputType)
value - The value to convert to an integerinputType - One of the available fields in the class, specifying the
input type
public static java.lang.String getOctal(java.lang.String value,
int inputType)
value - The value to convert to octalinputType - One of the available fields in the class, specifying the
input type
public static void main(java.lang.String[] args)
args - Array of strings to use in the main app
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||