public class SecsFormat20 extends java.lang.Object implements SecsFormat
Modifier and Type | Field and Description |
---|---|
int |
justification
The jusfication (left or right) of this item.
|
static int |
LEFT_JUSTIFY
Jusfication constant.
|
static int |
RIGHT_JUSTIFY
Jusfication constant.
|
java.lang.String |
theData |
Constructor and Description |
---|
SecsFormat20() |
SecsFormat20(char[] newValue) |
SecsFormat20(java.lang.String newValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
SecsFormat[] |
getArray()
This allows for arrays of secsformats (not a list of secsformats).
|
boolean |
getBoolValue()
Returns the true if the length of the data is non-zero.
|
byte |
getByteValue()
Returns the data converted to a byte.
|
double |
getDoubleValue()
Returns the data converted to a double.
|
float |
getFloatValue()
Returns the data converted to a float.
|
byte[] |
getFormattedBytes()
Returns the list in a manner suitable for encoding directly into a SECS
message byte stream used over SECSI or HSMS transport.
|
int |
getIntValue()
Returns the data converted to a int.
|
int |
getJustification()
Get the justification of the formatted string.
|
int |
getLength()
Returns the length of the format.
|
long |
getLongValue()
Returns the data converted to a long.
|
int |
getNumberOfLengthBytes()
Returns the number of length bytes.
|
short |
getShortValue()
Returns the data converted to a short.
|
java.lang.String |
getStringValue()
Returns the data as a string.
|
int |
hashCode() |
void |
setArray(SecsFormat[] newValues)
This allows for a standard way to set arrays of secsformats.
|
void |
setDataFromByteArray(byte[] temp,
int offset,
int length)
stores the incoming value in the format object.
|
void |
setJustification(int justification)
Sets the justification of the formatted string.
|
void |
setLength(int newValue)
Sets the length of the format.
|
void |
setNumberOfLengthBytes(int numberOfLengthBytes)
Sets the number of length bytes to send when the format is encoded.
|
int |
size() |
java.lang.String |
toString()
Returns the SML string representing this value
|
java.lang.String |
toString(int indentCount)
Returns the indented SML string representing this value.
|
boolean |
zeroLength()
Returns true if the format is zero length.
|
public int justification
public static final int LEFT_JUSTIFY
public static final int RIGHT_JUSTIFY
public java.lang.String theData
public SecsFormat20()
public SecsFormat20(char[] newValue)
public SecsFormat20(java.lang.String newValue)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public SecsFormat[] getArray()
getArray
in interface SecsFormat
public boolean getBoolValue()
getBoolValue
in interface SecsFormat
public byte getByteValue()
getByteValue
in interface SecsFormat
public double getDoubleValue()
getDoubleValue
in interface SecsFormat
public float getFloatValue()
getFloatValue
in interface SecsFormat
public byte[] getFormattedBytes() throws SecsException
getFormattedBytes
in interface SecsFormat
SecsException
public int getIntValue()
getIntValue
in interface SecsFormat
public int getJustification()
the
- justificationpublic int getLength()
SecsFormat
getLength
in interface SecsFormat
public long getLongValue()
getLongValue
in interface SecsFormat
public int getNumberOfLengthBytes()
getNumberOfLengthBytes
in interface SecsFormat
public short getShortValue()
getShortValue
in interface SecsFormat
public java.lang.String getStringValue()
getStringValue
in interface SecsFormat
public int hashCode()
hashCode
in class java.lang.Object
public void setArray(SecsFormat[] newValues) throws SecsException
setArray
in interface SecsFormat
SecsException
public void setDataFromByteArray(byte[] temp, int offset, int length) throws SecsException
SecsFormat
setDataFromByteArray
in interface SecsFormat
SecsException
public void setJustification(int justification)
the
- justificationpublic void setLength(int newValue)
SecsFormat
setLength
in interface SecsFormat
newValue
- the new lengthpublic void setNumberOfLengthBytes(int numberOfLengthBytes) throws java.lang.IllegalArgumentException
setNumberOfLengthBytes
in interface SecsFormat
numberOfLengthBytes
- the new number of length bytes. This should
be 1, 2,3 or -1 to indicate the defaultjava.lang.IllegalArgumentException
- if the value is not 1, 2, 3 or -1public int size()
public java.lang.String toString()
public java.lang.String toString(int indentCount)
toString
in interface SecsFormat
the
- indentationpublic boolean zeroLength()
SecsFormat
zeroLength
in interface SecsFormat
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.