|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.teraspaces.qwfix.FIXTagCollection
public final class FIXTagCollection
Represents a collection of FIX tags. This class cannot be inherited.
| Field Summary | |
|---|---|
static FIXTagCollection |
EMPTY
The EMPTY collection. |
| Constructor Summary | |
|---|---|
FIXTagCollection(int[] data)
Instantiates a new fIX tag collection. |
|
| Method Summary | |
|---|---|
FIXTagCollection |
add(int tag)
Adds the specified tag to the collection. |
boolean |
contains(int tag)
Determines whether the collection contains the specified tag. |
boolean |
equals(Object obj)
|
FIXTagCollection |
exclude(FIXTagCollection c)
Removes the specified collection from the collection. |
FIXTagCollection |
exclude(int[] c)
Removes the specified collection from the collection. |
static FIXTagCollection |
fromSchema(FIXSchemaMessageFieldCollection schema)
Generates an instance of FIXTagCollection from part of a message schema. |
static FIXTagCollection |
fromSchema(FIXSchemaMessageFieldCollection schema,
int tag)
Generates an instance of FIXTagCollection from part of a message schema and a tag. |
static FIXTagCollection |
fromSchema(FIXSchemaMessageFieldCollection schema,
int[] tags)
Generates an instance of FIXTagCollection from part of a message schema and an array of tags. |
static FIXTagCollection |
fromXml(Element e)
Conversion. |
int |
get(int index)
Gets the tag at the specified index. |
FIXTagCollection |
intersect(FIXTagCollection c)
Calculates the intersection of two collections. |
FIXTagCollection |
intersect(int[] c)
Calculates the intersection of two collections. |
boolean |
isEmpty()
Gets a value indicating whether this tag list is empty. |
FIXTagCollection |
remove(int tag)
Removes the specified tag from the collection. |
int |
size()
Gets the count of tags in collection. |
int[] |
toArray()
Conversion. |
void |
toXml(Element e)
To xml. |
FIXTagCollection |
union(FIXTagCollection c)
Calculates the union of two collections. |
FIXTagCollection |
union(int[] c)
Calculates the union of two collections. |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final FIXTagCollection EMPTY
| Constructor Detail |
|---|
public FIXTagCollection(int[] data)
data - the list of tags| Method Detail |
|---|
public boolean isEmpty()
public boolean contains(int tag)
If count of tags in collection is less than 25, a linear search is performed; otherwise, it searches the hash table.
tag - the tag
public int size()
public int get(int index)
index - the index
public FIXTagCollection add(int tag)
If the tag is already contained in the current collection, the current collection is returned.
tag - the tag
public FIXTagCollection remove(int tag)
If the tag is not contained in the current collection, the current collection is returned.
tag - the tag
public FIXTagCollection exclude(FIXTagCollection c)
c - the collection of tags to be excluded
public FIXTagCollection exclude(int[] c)
c - the collection of tags to be excluded
public FIXTagCollection intersect(FIXTagCollection c)
c - the collection of tags to be interacted
public FIXTagCollection intersect(int[] c)
c - the collection of tags to be interacted
public FIXTagCollection union(FIXTagCollection c)
c - the collection of tags to be joined
public FIXTagCollection union(int[] c)
c - the collection of tags to be joined
public static FIXTagCollection fromSchema(FIXSchemaMessageFieldCollection schema)
schema - a message schema, component schema, repeating group schema, header or trailer schema
public static FIXTagCollection fromSchema(FIXSchemaMessageFieldCollection schema,
int tag)
If the tag is defined in the schema, the tag will be added to the FIXTagCollection.
If the tag is also a number tag of a repeating group, the tags in the whole group will also be added.
If the tag is a data tag or a data length length, the corresponding tag will be added to the collection.
If the tag is not defined in the schema, an empty collection will be returned.
schema - a message schema, component schema, repeating group schema, header or trailer schematag - the tag
public static FIXTagCollection fromSchema(FIXSchemaMessageFieldCollection schema,
int[] tags)
If the tag is defined in the schema, the tag will be added to the FIXTagCollection.
If the tag is also a number tag of a repeating group, the tags in the whole group will also be added.
If the tag is a data tag or a data length length, the corresponding tag will be added to the collection.
If the tag is not defined in the schema, an empty collection will be returned.
schema - a message schema, component schema, repeating group schema, header or trailer schematags - array of tags
public void toXml(Element e)
e - the epublic static FIXTagCollection fromXml(Element e)
e - the e
public boolean equals(Object obj)
equals in class Objectpublic int[] toArray()
|
||||||||||
| PREV CLASS NEXT CLASS | All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||