com.prowidesoftware.swift.model
Class SwiftBlock4

java.lang.Object
  extended by com.prowidesoftware.swift.model.SwiftBlock
      extended by com.prowidesoftware.swift.model.SwiftTagListBlock
          extended by com.prowidesoftware.swift.model.SwiftBlock4
All Implemented Interfaces:
java.io.Serializable

public class SwiftBlock4
extends SwiftTagListBlock
implements java.io.Serializable

Base class for SWIFT Body Block (block 4).
This block is where the actual message content is specified and is what most users see. Generally the other blocks are stripped off before presentation. It mainly contains a list of tags and its format representation, which is variable length and requires use of CRLF as a field delimiter.

Since:
4.0
Version:
$Id: SwiftBlock4.java,v 1.1.1.1 2013/04/10 17:04:50 mgriffa Exp $
Author:
www.prowidesoftware.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.prowidesoftware.swift.model.SwiftTagListBlock
tags
 
Fields inherited from class com.prowidesoftware.swift.model.SwiftBlock
blockType, id, input, output, unparsedTexts
 
Constructor Summary
SwiftBlock4()
          Default constructor
SwiftBlock4(java.util.List<Tag> tags)
          Constructor with tag initialization
 
Method Summary
 java.lang.String getName()
          Returns the block name (the value 4 as a string)
 java.lang.Integer getNumber()
          Returns the block number (the value 4 as an integer)
protected  void setBlockName(java.lang.String blockName)
          Sets the block name.
protected  void setBlockNumber(java.lang.Integer blockNumber)
          Sets the block number.
 
Methods inherited from class com.prowidesoftware.swift.model.SwiftTagListBlock
add, addTag, addTags, containsAnyOf, containsField, containsTag, containsTag, containsTag, equals, getField, getFieldByName, getFieldsByName, getSubBlock, getSubBlock, getSubBlock, getSubBlockAfterFirst, getSubBlockAfterLast, getSubBlockByIndex, getSubBlocks, getSubBlocks, getSubBlocks, getSubBlocks, getSubBlocks, getSubBlocks, getTag, getTagByName, getTagByNumber, getTagCount, getTagCount, getTagIndex, getTagMap, getTags, getTagsByContent, getTagsByName, getTagsByValue, getTagValue, getTagValues, hashCode, isEmpty, removeAll, removeTag, removeUntilFirst, setTags, setTags, size, splitByTagName, tagIterator, toString, trimAfterFirst, visit
 
Methods inherited from class com.prowidesoftware.swift.model.SwiftBlock
getBlockType, getId, getInput, getOutput, getUnparsedTexts, getUnparsedTextsSize, isTagBlock, setBlockType, setId, setInput, setOutput, setUnparsedTexts, unparsedTextAddText, unparsedTextAddText, unparsedTextGetAsMessage, unparsedTextGetText, unparsedTextIsMessage, unparsedTextVerify
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SwiftBlock4

public SwiftBlock4()
Default constructor


SwiftBlock4

public SwiftBlock4(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 null
java.lang.IllegalArgumentException - if parameter tags is not composed of Strings
Since:
5.0
Method Detail

setBlockNumber

protected void setBlockNumber(java.lang.Integer blockNumber)
Sets the block number. Will cause an exception unless setting block number to 4.

Overrides:
setBlockNumber in class SwiftTagListBlock
Parameters:
blockNumber - the block number to set
Throws:
java.lang.IllegalArgumentException - if parameter blockName is not the integer 4
Since:
5.0

setBlockName

protected void setBlockName(java.lang.String blockName)
Sets the block name. Will cause an exception unless setting block number to "4".

Overrides:
setBlockName in class SwiftTagListBlock
Parameters:
blockName - the block name to set
Throws:
java.lang.IllegalArgumentException - if parameter blockName is not the string "4"
Since:
5.0

getNumber

public java.lang.Integer getNumber()
Returns the block number (the value 4 as an integer)

Overrides:
getNumber in class SwiftTagListBlock
Returns:
Integer containing the block's number

getName

public java.lang.String getName()
Returns the block name (the value 4 as a string)

Overrides:
getName in class SwiftTagListBlock
Returns:
block name
Since:
5.0