public class SwiftBlockUser extends SwiftTagListBlock implements Serializable
Modifier and Type | Field and Description |
---|---|
protected String |
blockName
Block name.
|
protected Integer |
sortKey
Indicates the position of this user block in a message when persisted.
|
tags
blockType, id, input, output, unparsedTexts
Constructor and Description |
---|
SwiftBlockUser()
Default constructor
|
SwiftBlockUser(Integer blockNumber)
Constructor for empty numbered user block
|
SwiftBlockUser(Integer blockNumber,
List<Tag> tags)
Constructor for numbered user block with tag initialization
|
SwiftBlockUser(String blockName)
Constructor for named user block
|
SwiftBlockUser(String blockName,
List<Tag> tags)
Constructor for named user block with tag initialization
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getBlockName()
The block name.
|
String |
getName()
Returns the block name (this method is to be overwritten for derived classes).
|
Integer |
getNumber()
Returns the block number (if it can be converted to an integer, -1 otherwise).
|
Integer |
getSortKey()
get the sortkey of this user block when persisted
|
int |
hashCode() |
protected Boolean |
isValidName()
Checks if the block name (and or number) is valid for a user defined block.
|
static Boolean |
isValidName(Integer blockNumber)
Checks if the block number is valid for a user defined block.
|
static Boolean |
isValidName(String blockName)
Checks if the block name is valid for a user defined block.
|
static Boolean |
isValidName(String blockName,
Integer blockNumber)
Checks if the block name and are valid for a user defined block.
|
protected void |
setBlockName(String blockName)
Sets the block name.
|
protected void |
setBlockNumber(Integer blockNumber)
Sets the block number.
|
void |
setSortKey(Integer sortKey)
Set the sortkey of this user block when persisted.
|
add, addTag, addTags, append, containsAllOf, containsAnyOf, containsField, containsTag, containsTag, containsTag, countAll, countByName, countTagsStarsWith, filterByName, filterByNameOrdered, getField, getFieldByName, getFieldByName, getFieldByName, getFieldByNumber, getFieldByNumber, getFieldsByName, getFieldsByName, getFieldsByNumber, getOptionalList, getOptionalList, getOptionalLists, getSubBlock, getSubBlock, getSubBlock, getSubBlock, getSubBlockAfterFirst, getSubBlockAfterLast, getSubBlockBeforeFirst, getSubBlockBeforeLast, getSubBlockByIndex, getSubBlockDelimitedWithOptionalTail, getSubBlocks, getSubBlocks, getSubBlocks, getSubBlocks, getSubBlocks, getSubBlocks, getSubBlocksDelimitedWithOptionalTail, getTag, getTagByName, getTagByNumber, getTagIndex, getTagMap, getTags, getTagsByContent, getTagsByName, getTagsByNumber, getTagsByValue, getTagValue, getTagValues, indexOfAnyFirst, indexOfAnyFirstAfterIndex, indexOfAnyLast, indexOfAnyLastAfterIndex, indexOfFirst, indexOfLast, isEmpty, iterator, removeAfterFirst, removeAfterFirstStartsWith, removeAll, removeSubBlock, removeTag, removeUntilFirst, setTags, setTags, size, splitByTagName, sublist, tagIterator, tagNamesList, toJson, toString, trimAfterFirst, visit
getBlockType, getId, getUnparsedTexts, getUnparsedTextsSize, isTagBlock, setBlockType, setId, setInput, setOutput, setUnparsedTexts, unparsedTextAddText, unparsedTextAddText, unparsedTextGetAsMessage, unparsedTextGetText, unparsedTextIsMessage, unparsedTextVerify
protected String blockName
protected Integer sortKey
public SwiftBlockUser()
public SwiftBlockUser(Integer blockNumber)
blockNumber
- the block number to initializeIllegalArgumentException
- if parameter blockNumber is null
IllegalArgumentException
- if parameter blockNumber is not a valid User Defined Block number (values 6..9)public SwiftBlockUser(Integer blockNumber, List<Tag> tags)
blockNumber
- the block number to initializetags
- the list of tags to initializeIllegalArgumentException
- if parameter blockNumber or tags are null
IllegalArgumentException
- if parameter blockNumber is not a valid User Defined Block number (values 6..9)IllegalArgumentException
- if parameter tags is not composed of Stringspublic SwiftBlockUser(String blockName)
blockName
- the block name to initializeIllegalArgumentException
- if parameter blockName is null
IllegalArgumentException
- if parameter blockName is not a valid User Defined Block name (single letter)public SwiftBlockUser(String blockName, List<Tag> tags)
blockName
- the block name to initializetags
- the list of tags to initializeIllegalArgumentException
- if parameter blockName or tags are null
IllegalArgumentException
- if parameter blockName is not a valid User Defined Block name (single letter)IllegalArgumentException
- if parameter tags is not composed of Stringspublic boolean equals(Object obj)
equals
in class SwiftTagListBlock
public String getBlockName()
public String getName()
SwiftBlock
getName
in class SwiftTagListBlock
getBlockName()
public Integer getNumber()
getNumber
in class SwiftTagListBlock
public Integer getSortKey()
sortKey
public int hashCode()
hashCode
in class SwiftTagListBlock
protected Boolean isValidName()
public static Boolean isValidName(Integer blockNumber)
blockNumber
- the block numberpublic static Boolean isValidName(String blockName)
blockName
- the block namepublic static Boolean isValidName(String blockName, Integer blockNumber)
blockName
- the block nameblockNumber
- the block numberprotected void setBlockName(String blockName)
setBlockName
in class SwiftTagListBlock
blockName
- the block name to setIllegalArgumentException
- if parameter blockName is null
IllegalArgumentException
- if parameter blockName is not a valid User Defined Block name (single letter)protected void setBlockNumber(Integer blockNumber)
blockName
setBlockNumber
in class SwiftTagListBlock
blockNumber
- the block number to setIllegalArgumentException
- if parameter blockNumber is null
IllegalArgumentException
- if parameter blockNumber is not a valid User Defined Block number (values 6..9)public void setSortKey(Integer sortKey)
sortKey
- the new sortkey