org.marketcetera.orderloader.fix
Class CustomField<T>
java.lang.Object
quickfix.Field<T>
org.marketcetera.orderloader.fix.CustomField<T>
- All Implemented Interfaces:
- Serializable
public class CustomField<T>
- extends Field<T>
Represents "custom" fields (ie non-predetermined fields) that can show up in
the list of orders
These can appear only as integers, and their value are treated as either
ints, doubles or strings (catch-all)
Ex: Price,OrderQty,1324,Account
- Since:
- 0.5.0
- Version:
- $Id: CustomField.java 16154 2012-07-14 16:34:05Z colin $
- Author:
- Toli Kuznets
- See Also:
- Serialized Form
|
Constructor Summary |
CustomField(int i,
T inObject)
Create a new CustomField instance. |
CustomField
public CustomField(int i,
T inObject)
- Create a new CustomField instance.
- Parameters:
i - an int valueinObject - a T value
parseMessageValue
public Object parseMessageValue(String inValue)
- Custom field interprets the message the following way:
1. if it parses as an int, return an int
2. if it parses as a
BigDecimal, return a BigDecimal
3. else, return a String
- Parameters:
inValue - Field value we are interpreting
- Returns:
- Int, Double or String
toString
public String toString()
- Overrides:
toString in class Field<T>
hashCode
public int hashCode()
- Overrides:
hashCode in class Field<T>
equals
public boolean equals(Object obj)
- Overrides:
equals in class Field<T>
getCustomField
public static CustomField<?> getCustomField(String inName)
throws OrderParsingException
- Fields are treated as custom when the header name is not "standard" and
the name can be parsed as an int.
- Parameters:
inName -
- Returns:
- Custom field for the passed in key
- Throws:
OrderParsingException
Copyright © 2012. All Rights Reserved.