|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpds.label.PDSValue
public class PDSValue
PDSValue is a class that contains a value which can be associated with an element. A value also has a units description and a potential data type.
Field Summary | |
---|---|
int |
mType
The data type for the value |
String |
mUnits
The units of the value |
String |
mValue
The value assocated with the instance |
static int |
TYPE_LITERAL
A literal (') string. |
static int |
TYPE_NONE
Data type is unspecified |
static int |
TYPE_STRING
A quoted (") string. |
Constructor Summary | |
---|---|
PDSValue()
Creates and instance of a PDSValue |
Method Summary | |
---|---|
void |
dump(PrintStream out)
Dump all information about an element. |
String |
formatValue()
Format the value and return a string containing it. |
String |
formatValue(boolean plain)
Format the value and return a string containing it. |
boolean |
isQuoted()
Returns true is the data type of the value is quoted. |
int |
length()
Return the length of the value when formated using PDS standards. |
void |
print()
Output a value formated using PDS standards. |
void |
print(PrintStream out,
int offset,
int indentLength,
int maxLength)
Output a value formated using PDS standards. |
String |
wrapPad(String text,
int offset,
int indentLength,
int maxLength)
Reformats a string so that it does not exceed a given length. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_NONE
public static final int TYPE_STRING
public static final int TYPE_LITERAL
public String mValue
public String mUnits
public int mType
Constructor Detail |
---|
public PDSValue()
Method Detail |
---|
public int length()
public void print()
public void print(PrintStream out, int offset, int indentLength, int maxLength)
out
- the stream to print the element to.offset
- the number of spaces the first character of the string
is to be offset.indentLength
- the number of spaces to indent each line not on the
same line as the keyword.maxLength
- the maximum length for any line.public String formatValue()
public String formatValue(boolean plain)
plain
- flag indicating if the value is not to be adorned
with appropriate quotation marks.
public boolean isQuoted()
public String wrapPad(String text, int offset, int indentLength, int maxLength)
text
- the string of text to wrap and pad.offset
- the number of spaces the first character of the string
is to be offset.indentLength
- the number of spaces to indent each line not on the
same line as the keyword.maxLength
- the maximum length for any line.
public void dump(PrintStream out)
out
- the stream to print the element to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |