Package com.prowidesoftware.swift.model
Class SwiftBlock5
- java.lang.Object
-
- com.prowidesoftware.swift.model.SwiftBlock
-
- com.prowidesoftware.swift.model.SwiftTagListBlock
-
- com.prowidesoftware.swift.model.SwiftBlock5
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<Tag>
public class SwiftBlock5 extends SwiftTagListBlock implements java.io.Serializable
Base class for SWIFT Trailer Block (block 5).Each SWIFT message has one or more trailers as required by the message exchange and security requirements. System trailers, if applicable, follow user trailers.
- Since:
- 4.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.prowidesoftware.swift.model.SwiftTagListBlock
EMPTY_LIST
-
Fields inherited from class com.prowidesoftware.swift.model.SwiftBlock
blockType, input, output, unparsedTexts
-
-
Constructor Summary
Constructors Constructor Description SwiftBlock5()
Default constructorSwiftBlock5(java.util.List<Tag> tags)
Constructor with tag initialization
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SwiftBlock5
fromJson(java.lang.String json)
This method deserializes the JSON data into a block 5 object.java.lang.String
getName()
Returns the block name (the value 5 as a string)java.lang.Integer
getNumber()
Returns the block number (the value 5 as an integer)java.util.Optional<Tag>
getTag(SwiftBlock5Field field)
Gets a specific field from the trailer.protected void
setBlockName(java.lang.String blockName)
Sets the block name.protected void
setBlockNumber(java.lang.Integer blockNumber)
Sets the block number.SwiftBlock5
setPDE()
Sets the Possible Duplicate Emission tag with no value.SwiftBlock5
setTag(SwiftBlock5Field field, java.lang.String value)
Sets a specific field in the trailer.-
Methods inherited from class com.prowidesoftware.swift.model.SwiftTagListBlock
addTag, addTags, append, append, append, append, append, append, asTagArray, clear, containsAllOf, containsAnyOf, containsField, containsTag, containsTag, containsTag, countAll, countByName, countTagsStarsWith, equals, fields, filterByName, filterByNameOrdered, getField, getFieldByName, getFieldByName, getFieldByName, getFieldByNumber, getFieldByNumber, getFieldByQualifiers, getFieldsByName, getFieldsByName, getFieldsByNumber, getOptionalList, getOptionalList, getOptionalLists, getSubBlock, getSubBlock, getSubBlock, getSubBlock, getSubBlockAfterFirst, getSubBlockAfterFirst, getSubBlockAfterLast, getSubBlockBeforeFirst, getSubBlockBeforeFirst, getSubBlockBeforeLast, getSubBlockByTagNames, getSubBlockDelimitedWithOptionalTail, getSubBlocks, getSubBlocks, getSubBlocks, getSubBlocks, getSubBlocks, getSubBlocks, getSubBlocksByTagNames, getSubBlocksDelimitedWithOptionalTail, getTag, getTagByName, getTagByName, getTagByNumber, getTagIndex, getTagMap, getTags, getTagsByContent, getTagsByName, getTagsByName, getTagsByNumber, getTagsByValue, getTagValue, getTagValues, hashCode, indexOfAnyFirst, indexOfAnyFirstAfterIndex, indexOfAnyLast, indexOfAnyLastAfterIndex, indexOfFirst, indexOfFirstValue, indexOfLast, indexOfLastValue, isEmpty, iterator, removeAfterFirstStartsWith, removeAll, removeSubBlock, removeSubBlocks, removeTag, setTag, setTags, setTags, size, splitByTagName, splitByTagName, sublist, tagIterator, tagNamesList, toJson, toString, visit
-
Methods inherited from class com.prowidesoftware.swift.model.SwiftBlock
getBlockType, getInput, getOutput, getUnparsedTexts, getUnparsedTextsSize, isTagBlock, setBlockType, setInput, setOutput, setUnparsedTexts, unparsedTextAddText, unparsedTextAddText, unparsedTextGetAsMessage, unparsedTextGetText, unparsedTextIsMessage, unparsedTextVerify
-
-
-
-
Constructor Detail
-
SwiftBlock5
public SwiftBlock5()
Default constructor
-
SwiftBlock5
public SwiftBlock5(java.util.List<Tag> tags)
Constructor with tag initialization- Parameters:
tags
- the list of tags to initialize- Throws:
java.lang.IllegalArgumentException
- if parameter tags is nulljava.lang.IllegalArgumentException
- if parameter tags is not composed of Strings- Since:
- 5.0
-
-
Method Detail
-
fromJson
public static SwiftBlock5 fromJson(java.lang.String json)
This method deserializes the JSON data into a block 5 object.- Since:
- 7.9.8
- See Also:
SwiftTagListBlock.toJson()
-
setBlockNumber
protected void setBlockNumber(java.lang.Integer blockNumber)
Sets the block number. Will cause an exception unless setting block number to 5.- Overrides:
setBlockNumber
in classSwiftTagListBlock
- Parameters:
blockNumber
- the block number to set- Throws:
java.lang.IllegalArgumentException
- if parameter blockName is not the integer 5- Since:
- 5.0
-
setBlockName
protected void setBlockName(java.lang.String blockName)
Sets the block name. Will cause an exception unless setting block number to "5".- Overrides:
setBlockName
in classSwiftTagListBlock
- Parameters:
blockName
- the block name to set- Throws:
java.lang.IllegalArgumentException
- if parameter blockName is not the string "5"- Since:
- 5.0
-
getNumber
public java.lang.Integer getNumber()
Returns the block number (the value 5 as an integer)- Overrides:
getNumber
in classSwiftTagListBlock
- Returns:
- Integer containing the block's number
-
getName
public java.lang.String getName()
Returns the block name (the value 5 as a string)- Overrides:
getName
in classSwiftTagListBlock
- Returns:
- block name
- Since:
- 5.0
-
setTag
public SwiftBlock5 setTag(SwiftBlock5Field field, java.lang.String value)
Sets a specific field in the trailer. If the field exists, its value will be overwritten.- Parameters:
field
- the specific field to set or updatevalue
- optional field value, could be a time, a MIR, or any other value for the field; null is also accepted when the field should hold no value- Since:
- 8.0.2
-
getTag
public java.util.Optional<Tag> getTag(SwiftBlock5Field field)
Gets a specific field from the trailer.- Parameters:
field
- the specific field to get- Returns:
- the found field
- Since:
- 8.0.2
-
setPDE
public SwiftBlock5 setPDE()
Sets the Possible Duplicate Emission tag with no value. If the field exists, its value will be overwritten.- Since:
- 8.0.2
-
-