public class PDSValue
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
mType
The data type for the value
|
java.lang.String |
mUnits
The units of the value
|
java.lang.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 and Description |
---|
PDSValue()
Creates and instance of a PDSValue
|
Modifier and Type | Method and Description |
---|---|
void |
dump(java.io.PrintStream out)
Dump all information about an element.
|
java.lang.String |
formatValue()
Format the value and return a string containing it.
|
java.lang.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(java.io.PrintStream out,
int offset,
int indentLength,
int maxLength)
Output a value formated using PDS standards.
|
java.lang.String |
wrapPad(java.lang.String text,
int offset,
int indentLength,
int maxLength)
Reformats a string so that it does not exceed
a given length.
|
public static final int TYPE_NONE
public static final int TYPE_STRING
public static final int TYPE_LITERAL
public java.lang.String mValue
public java.lang.String mUnits
public int mType
public int length()
public void print()
public void print(java.io.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 java.lang.String formatValue()
public java.lang.String formatValue(boolean plain)
plain
- flag indicating if the value is not to be adorned
with appropriate quotation marks.public boolean isQuoted()
public java.lang.String wrapPad(java.lang.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(java.io.PrintStream out)
out
- the stream to print the element to.