Package com.epam.fix.message.rg
Class RepeatingGroup
java.lang.Object
com.epam.fix.message.rg.RepeatingGroup
- All Implemented Interfaces:
Iterable<RepeatingGroup.Entry>
Class for work with repeating group data.
All repeating group data are stored at IndexedStorage, instances of this class is only view for repeating group data.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class for work with entry data. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEntry()
Adds entry to the end of groupaddEntry
(int index) Adds entry to the specific index at group.void
addEntry
(int index, RepeatingGroup.Entry entry) Adds passed entry to the specific index at group.Copy entry to end of repeating groupcopyEntry
(RepeatingGroup.Entry src, int index) Copy entry at specified index of repeating groupvoid
Copy entry to end of repeating groupvoid
copyEntry
(RepeatingGroup.Entry src, RepeatingGroup.Entry dst, int index) Copy entry at specified index of repeating groupgetEntry
(int index) Returns entry from specific instance.void
getEntry
(int index, RepeatingGroup.Entry entry) Fills passed entry instance by entry data.int
Returns group's leading tagint
Returns value of group's leading tag.int
getSize()
Returns number of entries in group.boolean
Returns true if validation turn of for this groupiterator()
Returns iterator by entries of repeating groupvoid
release()
Returns group to pool if group was got by RepeatingGroupPool.getRepeatingGroup().void
remove()
Removes current groupvoid
removeEntry
(int index) Removes passed entry from the specific index.void
removeEntry
(RepeatingGroup.Entry entry) Removes passed entry from groupvoid
removeEntryAndClean
(int index) Removes passed entry from the specific index.void
Removes passed entry from group and clean message - remove group instance if it is emptyvoid
setValidation
(boolean validation) Turn on/off validationbyte[]
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RepeatingGroup
public RepeatingGroup()
-
-
Method Details
-
removeEntry
Removes passed entry from group- Parameters:
entry
- entry for remove
-
removeEntryAndClean
Removes passed entry from group and clean message - remove group instance if it is empty- Parameters:
entry
- entry for remove
-
isValidationTurnOn
public boolean isValidationTurnOn()Returns true if validation turn of for this group- Returns:
- validation
-
setValidation
public void setValidation(boolean validation) Turn on/off validation- Parameters:
validation
- validation
-
release
public void release()Returns group to pool if group was got by RepeatingGroupPool.getRepeatingGroup(). If group was got by callingRepeatingGroup addRepeatingGroup()
method orRepeatingGroup getRepeatingGroup()
, then it does nothing. -
addEntry
Adds entry to the end of group- Returns:
- instance of Entry from RepeatingGroupPool. There is no need to call release for this object.
-
addEntry
Adds entry to the specific index at group.- Parameters:
index
- number of entry in group. In other words, if adds first entry, then index equals to 0, if adds second entry, then index equals to 1 and so on.- Returns:
- instance of Entry from RepeatingGroupPool. There is no need to call release for this object.
-
addEntry
Adds passed entry to the specific index at group.- Parameters:
index
- number of entry in group. In other words, if adds first entry, then index equals to 0, if adds second entry, then index equals to 1 and so on.entry
- entry for add
-
remove
public void remove()Removes current group -
removeEntry
public void removeEntry(int index) Removes passed entry from the specific index.- Parameters:
index
- number of entry in group. In other words, if adds first entry, then index equals to 0, if adds second entry, then index equals to 1 and so on.
-
removeEntryAndClean
public void removeEntryAndClean(int index) Removes passed entry from the specific index.- Parameters:
index
- number of entry in group. In other words, if adds first entry, then index equals to 0, if adds second entry, then index equals to 1 and so on.
-
getLeadingTagValue
public int getLeadingTagValue()Returns value of group's leading tag.- Returns:
- value of group's leading tag
-
getSize
public int getSize()Returns number of entries in group.- Returns:
- number of entries in group
-
getEntry
Fills passed entry instance by entry data.- Parameters:
index
- number of entry in group. In other words, if adds first entry, then index equals to 0, if adds second entry, then index equals to 1 and so on.entry
- entry for fill.
-
getEntry
Returns entry from specific instance.- Parameters:
index
- number of entry in group. In other words, if adds first entry, then index equals to 0, if adds second entry, then index equals to 1 and so on.- Returns:
- instance of Entry from RepeatingGroupPool, filled by entry data. There is no need to call release for this object.
-
getLeadingTag
public int getLeadingTag()Returns group's leading tag- Returns:
- leading tag of group
-
iterator
Returns iterator by entries of repeating group- Specified by:
iterator
in interfaceIterable<RepeatingGroup.Entry>
- Returns:
- iterator
-
toString
-
toPrintableString
-
toByteArray
public byte[] toByteArray() -
copyEntry
Copy entry to end of repeating group- Parameters:
src
- entry for copy- Returns:
- copied entry
-
copyEntry
Copy entry at specified index of repeating group- Parameters:
src
- entry for copyindex
- index at which the source entry is to be copied- Returns:
- copied entry
-
copyEntry
Copy entry to end of repeating group- Parameters:
src
- entry for copydst
- entry for hold copied entry
-
copyEntry
Copy entry at specified index of repeating group- Parameters:
src
- entry for copydst
- entry for hold copied entryindex
- index at which the source entry is to be copied
-