public abstract class SwiftValueBlock extends SwiftBlock implements Serializable
blockType, id, input, output, unparsedTexts
Modifier | Constructor and Description |
---|---|
protected |
SwiftValueBlock()
Default constructor, shouldn't be used normally.
|
Modifier and Type | Method and Description |
---|---|
String |
getBlockValue()
This method should be overwritten by subclasses, calling
this method will throw a
java.lang.UnsupportedOperationException |
String |
getValue()
This method should be overwritten by subclasses, calling
this method will throw a
java.lang.UnsupportedOperationException |
protected String |
getValuePart(String value,
int start)
Returns a fragment of the block value received from a starting index until the end of value
(or
null if value is not large enough).This method is used in derived classes to get value fragments. |
protected String |
getValuePart(String value,
int start,
int size)
returns a fragment of the block value received (or
null if value is not large enough).This method is used in derived classes to get value fragments. |
boolean |
isEmpty()
Tells if the block contains at least one field.
|
void |
setBlockValue(String value)
This method should be overwritten by subclasses, calling
this method will throw a
java.lang.UnsupportedOperationException |
void |
setValue(String value)
This method should be overwritten by subclasses and proper
parsing be done to set specific values of the block, calling
this method will throw a
java.lang.UnsupportedOperationException |
int |
size()
Tells the block's string value size (in chars).
NOTICE this does not return the actual number of fields set because value blocks are mostly fixed length. |
equals, getBlockType, getId, getInput, getName, getNumber, getOutput, getUnparsedTexts, getUnparsedTextsSize, hashCode, isTagBlock, setBlockName, setBlockNumber, setBlockType, setId, setInput, setOutput, setUnparsedTexts, toString, unparsedTextAddText, unparsedTextAddText, unparsedTextGetAsMessage, unparsedTextGetText, unparsedTextIsMessage, unparsedTextVerify
protected SwiftValueBlock()
public String getBlockValue()
java.lang.UnsupportedOperationException
public String getValue()
java.lang.UnsupportedOperationException
public void setValue(String value)
java.lang.UnsupportedOperationException
value
- the blocks value as a single stringpublic void setBlockValue(String value)
java.lang.UnsupportedOperationException
value
- unusedpublic boolean isEmpty()
java.lang.UnsupportedOperationException
true
if getValue returns a non null
objectpublic int size()
java.lang.UnsupportedOperationException
protected String getValuePart(String value, int start, int size)
null
if value is not large enough).value
- the full block valuestart
- the starting point of the fragment in the big block valuesize
- the fragment sizenull
if value is not large enoughprotected String getValuePart(String value, int start)
null
if value is not large enough).value
- the full block valuestart
- the starting point of the fragment in the big block valuenull
if value is not large enough