Package com.epam.fix.message.rg
Class EntryImpl
java.lang.Object
com.epam.fix.message.rg.EntryImpl
- Direct Known Subclasses:
RepeatingGroup.Entry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<RepeatingGroup>
protected boolean
protected EntriesArray
protected int
protected RepeatingGroup
protected gnu.trove.set.hash.TIntHashSet
protected gnu.trove.set.hash.TIntHashSet
protected gnu.trove.set.hash.TIntHashSet
protected boolean
protected RepeatingGroupArray
protected RepeatingGroupStorage
protected IndexedStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddRepeatingGroup
(int leadingTag) Adds sub group to entry.addRepeatingGroup
(int leadingTag, boolean validation) Adds sub group to entry.void
addRepeatingGroup
(int leadingTag, boolean validation, RepeatingGroup subGroup) Adds sub group to entry.void
addRepeatingGroup
(int leadingTag, RepeatingGroup group) int
addTag
(int tag, boolean value) Adds tag to entry.int
addTag
(int tag, byte[] value) Adds tag to entry.int
addTag
(int tag, byte[] value, int offset, int length) Adds tag to entry.int
addTag
(int tag, double value, int precision) Adds tag to entry.int
addTag
(int tag, long value) Adds tag to entry.int
addTag
(int tag, CharSequence value) Adds tag to entry.int
addTag
(int tag, Calendar value, FIXDateFormatterFactory.FIX_DATE_TYPE type) Adds tag to entry.int
Adds tagValue to entry.void
clear()
copyRepeatingGroup
(RepeatingGroup source) Copy repeating group to entryvoid
copyRepeatingGroup
(RepeatingGroup source, RepeatingGroup dst) Copy repeating group to entryint
Returns entry index in FIX messagegetGroup()
Returns group which owns entrygetOrAddRepeatingGroup
(int leadingTag) Returns repeating group from entry by leading tag.void
getOrAddRepeatingGroup
(int leadingTag, RepeatingGroup group) Fills passed repeating group instance by data from entry.getRepeatingGroup
(int leadingTag) Returns repeating group from entry by leading tagvoid
getRepeatingGroup
(int leadingTag, RepeatingGroup group) Fills passed repeating group instance by data from entrygetRepeatingGroupAtIndex
(int index) Returns repeating groupvoid
getRepeatingGroupAtIndex
(int index, RepeatingGroup group) Fills repeating group by repeating group dataint
getSize()
Returns number of added tag in entryvoid
Fills passed TagValue object by tag datavoid
getTagAtIndex
(int index, TagValue dest) Fills passed TagValue object by tag data from indexint
getTagIndex
(int tag) boolean
getTagValueAsBool
(int tag) Returns tag value as booleanboolean
getTagValueAsBoolAtIndex
(int index) Returns tag value as booleanbyte
getTagValueAsByte
(int tag) Returns first byte of tag valuebyte
getTagValueAsByte
(int tag, int offset) Returns byte of tag value at offsetbyte
getTagValueAsByteAtIndex
(int index) Returns first byte of tag valuebyte
getTagValueAsByteAtIndex
(int index, int offset) Returns byte of tag value at offsetbyte[]
getTagValueAsBytes
(int tag) Returns tag value as byte arrayint
getTagValueAsBytes
(int tag, byte[] dest, int offset) Returns tag value as byte arraybyte[]
getTagValueAsBytesAtIndex
(int index) Returns tag value as byte arrayint
getTagValueAsBytesAtIndex
(int index, byte[] dest, int offset) Returns tag value as byte arraydouble
getTagValueAsDouble
(int tag) Returns tag value as doubledouble
getTagValueAsDoubleAtIndex
(int index) Returns tag value as doublelong
getTagValueAsLong
(int tag) Returns tag value as longlong
getTagValueAsLongAtIndex
(int index) Returns tag value as longgetTagValueAsString
(int tag) Returns tag value as stringgetTagValueAsStringAtIndex
(int index) Returns tag value as stringvoid
getTagValueAsStringBuff
(int tag, StringBuffer str) Fills passed StringBuffer by tag valuevoid
getTagValueAsStringBuffAtIndex
(int index, StringBuffer str) Fills passed StringBuffer by tag valueboolean
isEmpty()
boolean
isGroupTag
(int tag) Checks whether tag is leading tag of groupboolean
isGroupTagAtIndex
(int index) Checks whether tag is group tag at indexboolean
isRepeatingGroupExists
(int leadingTag) Checks is entry contains nested group with passed leading tag.boolean
isTagExists
(int tag) Returns true if tag exists in entryboolean
removeRepeatingGroup
(int leadingTag) Removes repeating group from entryboolean
removeRepeatingGroupAtIndex
(int index) Removes repeating group from entryboolean
removeTag
(int tag) Removes tag from entryboolean
removeTagAtIndex
(int index) Removes tag from entry by indexint
size()
Returns number of added tag in entrybyte[]
toString()
int
updateValue
(int tag, boolean value, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tag valueint
updateValue
(int tag, byte[] value, int offset, int length, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tag valueint
updateValue
(int tag, byte[] value, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tag valueint
updateValue
(int tag, double value, int precision, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tag valueint
updateValue
(int tag, long value, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tag valueint
updateValue
(int tag, CharSequence strBuffer, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tag valueint
updateValue
(int tag, Calendar value, FIXDateFormatterFactory.FIX_DATE_TYPE type, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tag valueint
updateValue
(TagValue tagValue, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tagValue
-
Field Details
-
storage
-
group
-
entryIndex
protected int entryIndex -
groupTags
protected gnu.trove.set.hash.TIntHashSet groupTags -
outerLeadingTags
protected gnu.trove.set.hash.TIntHashSet outerLeadingTags -
nestedLeadingTags
protected gnu.trove.set.hash.TIntHashSet nestedLeadingTags -
allocatedSubGroups
-
releaseNeeded
protected boolean releaseNeeded -
deleted
protected boolean deleted -
rgStorage
-
rgArray
-
entriesArray
-
-
Constructor Details
-
EntryImpl
public EntryImpl()
-
-
Method Details
-
addRepeatingGroup
Adds sub group to entry. Validation for this group is turned off.- Parameters:
leadingTag
- leading tag for repeating group.- Returns:
- instance of RepeatingGroup from RepeatingGroupPool. There is no need to call release for this object.
-
addRepeatingGroup
-
addRepeatingGroup
Adds sub group to entry.- Parameters:
leadingTag
- leading tag for repeating group.validation
- turn on/off validation- Returns:
- instance of RepeatingGroup from RepeatingGroupPool. There is no need to call release for this object.
-
addRepeatingGroup
Adds sub group to entry.- Parameters:
leadingTag
- leading tag for repeating group.validation
- turn on/off validation.subGroup
- group for further work.
-
addTag
Adds tagValue to entry.- Parameters:
tagValue
- value for add.- Returns:
- index in message (not in group or entry) in which value was added
-
addTag
public int addTag(int tag, byte[] value) Adds tag to entry.- Parameters:
tag
- tag for addvalue
- value for add- Returns:
- index in message (not in group or entry) in which value was added
-
addTag
public int addTag(int tag, boolean value) Adds tag to entry.- Parameters:
tag
- tag for addvalue
- value for add- Returns:
- index in message (not in group or entry) in which value was added
-
addTag
public int addTag(int tag, byte[] value, int offset, int length) Adds tag to entry.- Parameters:
tag
-value
- byte array for addoffset
- offset in passed arraylength
- length of array that will be added- Returns:
- index in message (not in group or entry) in which value was added
-
addTag
public int addTag(int tag, double value, int precision) Adds tag to entry.- Parameters:
tag
- tag for addvalue
- value for addprecision
- precision of value rounding- Returns:
- index in message (not in group or entry) in which value was added
-
addTag
public int addTag(int tag, long value) Adds tag to entry.- Parameters:
tag
- tag for addvalue
- value for add- Returns:
- index in message (not in group or entry) in which value was added
-
addTag
Adds tag to entry.- Parameters:
tag
- tag for addvalue
- value for add- Returns:
- index in message (not in group or entry) in which value was added
-
addTag
Adds tag to entry.- Parameters:
tag
- tag for addvalue
- value for addtype
- type of date- Returns:
- index in message (not in group or entry) in which value was added
-
updateValue
Updates tagValue- Parameters:
tagValue
- tagValue for updateaddIfNotExists
- determines the behavior in case if tag is not exists- Returns:
- index of updated value in fix message (not in group or entry)
-
updateValue
public int updateValue(int tag, byte[] value, int offset, int length, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tag value- Parameters:
tag
- tag for updatevalue
- new value for tagoffset
- offset in passed arraylength
- length of array that will be addedaddIfNotExists
- determines the behavior in case if tag is not exists- Returns:
- index of updated value in fix message (not in group or entry)
-
updateValue
Updates tag value- Parameters:
tag
- tag for updatevalue
- new value for tagaddIfNotExists
- determines the behavior in case if tag is not exists- Returns:
- index of updated value in fix message (not in group or entry)
-
updateValue
Updates tag value- Parameters:
tag
- tag for updatevalue
- new value for tagaddIfNotExists
- determines the behavior in case if tag is not exists- Returns:
- index of updated value in fix message (not in group or entry)
-
updateValue
public int updateValue(int tag, double value, int precision, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tag value- Parameters:
tag
- tag for updatevalue
- new value for tagprecision
- precision of value roundingaddIfNotExists
- determines the behavior in case if tag is not exists- Returns:
- index of updated value in fix message (not in group or entry)
-
updateValue
public int updateValue(int tag, CharSequence strBuffer, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tag value- Parameters:
tag
- tag for updatestrBuffer
- new value for tagaddIfNotExists
- determines the behavior in case if tag is not exists- Returns:
- index of updated value in fix message (not in group or entry)
-
updateValue
Updates tag value- Parameters:
tag
- tag for updatevalue
- new value for tagaddIfNotExists
- determines the behavior in case if tag is not exists- Returns:
- index of updated value in fix message (not in group or entry)
-
updateValue
public int updateValue(int tag, Calendar value, FIXDateFormatterFactory.FIX_DATE_TYPE type, IndexedStorage.MISSING_TAG_HANDLING addIfNotExists) Updates tag value- Parameters:
tag
- tag for updatevalue
- new value for tagtype
- type of dateaddIfNotExists
- determines the behavior in case if tag is not exists- Returns:
- index of updated value in fix message (not in group or entry)
-
isTagExists
public boolean isTagExists(int tag) Returns true if tag exists in entry- Parameters:
tag
- tag for check- Returns:
- is tag exists
-
getTag
Fills passed TagValue object by tag data- Parameters:
tag
- tag for finddest
- object for fill
-
getTagValueAsString
Returns tag value as string- Parameters:
tag
- tag for find- Returns:
- tag value
-
getTagValueAsBytes
public byte[] getTagValueAsBytes(int tag) Returns tag value as byte array- Parameters:
tag
- tag for find- Returns:
- tag value
-
getTagValueAsBytes
public int getTagValueAsBytes(int tag, byte[] dest, int offset) Returns tag value as byte array- Parameters:
tag
- tag for finddest
- array for filloffset
- start index in passed array from which array will filled- Returns:
- length of wrote data
-
getTagValueAsByte
public byte getTagValueAsByte(int tag) Returns first byte of tag value- Parameters:
tag
- tag for find- Returns:
- first byte of tag value
-
getTagValueAsByte
public byte getTagValueAsByte(int tag, int offset) Returns byte of tag value at offset- Parameters:
tag
- tag for find- Returns:
- byte of tag value
-
getTagValueAsBool
public boolean getTagValueAsBool(int tag) Returns tag value as boolean- Parameters:
tag
- tag for find- Returns:
- tag value
-
getTagValueAsDouble
public double getTagValueAsDouble(int tag) Returns tag value as double- Parameters:
tag
- tag for find- Returns:
- tag value
-
getTagValueAsLong
public long getTagValueAsLong(int tag) Returns tag value as long- Parameters:
tag
- tag for find- Returns:
- tag value
-
getTagValueAsStringBuff
Fills passed StringBuffer by tag value- Parameters:
tag
- tag for findstr
- buffer for filled
-
getTagAtIndex
Fills passed TagValue object by tag data from index- Parameters:
index
- number of tag in entry (not in entire FIX message)dest
- object for fill
-
getTagValueAsStringAtIndex
Returns tag value as string- Parameters:
index
- number of tag in entry (not in entire FIX message)- Returns:
- tag value
-
getTagValueAsBytesAtIndex
public byte[] getTagValueAsBytesAtIndex(int index) Returns tag value as byte array- Parameters:
index
- number of tag in entry (not in entire FIX message)- Returns:
- tag value
-
getTagValueAsBytesAtIndex
public int getTagValueAsBytesAtIndex(int index, byte[] dest, int offset) Returns tag value as byte array- Parameters:
index
- number of tag in entry (not in entire FIX message)dest
- array for filloffset
- start index in passed array from which array will filled- Returns:
- length of wrote data
-
getTagValueAsByteAtIndex
public byte getTagValueAsByteAtIndex(int index) Returns first byte of tag value- Parameters:
index
- number of tag in entry (not in entire FIX message)- Returns:
- first byte of tag value
-
getTagValueAsByteAtIndex
public byte getTagValueAsByteAtIndex(int index, int offset) Returns byte of tag value at offset- Parameters:
index
- number of tag in entry (not in entire FIX message)- Returns:
- byte of tag value
-
getTagValueAsBoolAtIndex
public boolean getTagValueAsBoolAtIndex(int index) Returns tag value as boolean- Parameters:
index
- number of tag in entry (not in entire FIX message)- Returns:
- tag value
-
getTagValueAsDoubleAtIndex
public double getTagValueAsDoubleAtIndex(int index) Returns tag value as double- Parameters:
index
- number of tag in entry (not in entire FIX message)- Returns:
- tag value
-
getTagValueAsLongAtIndex
public long getTagValueAsLongAtIndex(int index) Returns tag value as long- Parameters:
index
- number of tag in entry (not in entire FIX message)- Returns:
- tag value
-
getTagValueAsStringBuffAtIndex
Fills passed StringBuffer by tag value- Parameters:
index
- number of tag in entry (not in entire FIX message)str
- buffer for filled
-
getRepeatingGroupAtIndex
Returns repeating group- Parameters:
index
- number of leading tag of group in entry (not in entire FIX message)- Returns:
- instance of RepeatingGroup from RepeatingGroupPool. There is no need to call release for this object.
-
getRepeatingGroupAtIndex
Fills repeating group by repeating group data- Parameters:
index
- number of leading tag of group in entry (not in entire FIX message)group
- repeating group object for fill
-
removeTag
public boolean removeTag(int tag) Removes tag from entry- Parameters:
tag
- tag for remove- Returns:
- is tag was removes
-
removeTagAtIndex
public boolean removeTagAtIndex(int index) Removes tag from entry by index- Parameters:
index
- number of tag in entry (not in entire FIX message)- Returns:
- is tag was removes
-
removeRepeatingGroup
public boolean removeRepeatingGroup(int leadingTag) Removes repeating group from entry- Parameters:
leadingTag
- leading tag of repeating group- Returns:
- true if repeating group was deleted
-
removeRepeatingGroupAtIndex
public boolean removeRepeatingGroupAtIndex(int index) Removes repeating group from entry- Parameters:
index
- index of leading tag group in entry (not in entire FIX message)- Returns:
- true if repeating group was deleted
-
getOrAddRepeatingGroup
Returns repeating group from entry by leading tag. If group doesn't exist, it will be added.- Parameters:
leadingTag
- leading tag for repeating group- Returns:
- instance of RepeatingGroup from RepeatingGroupPool. There is no need to call release for this object.
-
getOrAddRepeatingGroup
Fills passed repeating group instance by data from entry. If group doesn't exist, it will be added.- Parameters:
leadingTag
- leading tag for repeating groupgroup
- repeating group object for fill
-
isRepeatingGroupExists
public boolean isRepeatingGroupExists(int leadingTag) Checks is entry contains nested group with passed leading tag. Note that empty groups, that doesn't appear in the message, also considered existing- Parameters:
leadingTag
- leading tag for check- Returns:
- true if repeating group with passed leading tag exists.
-
isGroupTag
public boolean isGroupTag(int tag) Checks whether tag is leading tag of group- Parameters:
tag
- tag for check- Returns:
- true if tag is leading tag of group, false if tag doesn't exists or is not leading tag of group
-
isGroupTagAtIndex
public boolean isGroupTagAtIndex(int index) Checks whether tag is group tag at index- Parameters:
index
- number of tag in entry (not in entire FIX message)- Returns:
- true if tag is group tag
-
getTagIndex
public int getTagIndex(int tag) -
clear
public void clear() -
getRepeatingGroup
Returns repeating group from entry by leading tag- Parameters:
leadingTag
- leading tag for repeating group- Returns:
- instance of RepeatingGroup from RepeatingGroupPool. There is no need to call release for this object.
-
getRepeatingGroup
Fills passed repeating group instance by data from entry- Parameters:
leadingTag
- leading tag for repeating groupgroup
- repeating group object for fill
-
toString
-
toPrintableString
-
getSize
public int getSize()Returns number of added tag in entry- Returns:
- number of added tag in entry
-
size
public int size()Returns number of added tag in entry- Returns:
- number of added tag in entry
-
getGroup
Returns group which owns entry- Returns:
- group which owns entry
-
isEmpty
public boolean isEmpty() -
getEntryIndex
public int getEntryIndex()Returns entry index in FIX message- Returns:
- entry index in FIX message
-
toByteArray
public byte[] toByteArray() -
copyRepeatingGroup
Copy repeating group to entry- Parameters:
source
- repeating group for copy- Returns:
- copied repeating group
-
copyRepeatingGroup
Copy repeating group to entry- Parameters:
source
- repeating group for copydst
- entry for hold copied repeating group
-