class O2GValueMap

Parents
java.lang.Iterable

Brief

A value map containing order parameters.

Details

To create IO2GValueMap use O2GRequestFactory.createValueMap.
O2GValueMap contains elements of O2GRequestParamsEnum as keys and corresponding string, boolean, double or integer values.
O2GValueMap is used to combine orders's parameters when creating order request by O2GRequestFactory.createOrderRequest.

Create and fill O2GValueMap [hide]

    private O2GValueMap createOrder(String sAccountID, String sOfferID, double dRate, int iAmount, String sBuySell, String sOrderType, String sCustomID)
    {
        O2GRequestFactory factory = mSession.getRequestFactory();
        if (factory == null) {
            return null;
        }
        O2GValueMap valuemap = factory.createValueMap();
        valuemap.setString(O2GRequestParamsEnum.COMMAND, Constants.Commands.CreateOrder);
        valuemap.setString(O2GRequestParamsEnum.ORDER_TYPE, sOrderType);
        valuemap.setString(O2GRequestParamsEnum.ACCOUNT_ID, sAccountID);
        valuemap.setString(O2GRequestParamsEnum.OFFER_ID, sOfferID);
        valuemap.setString(O2GRequestParamsEnum.BUY_SELL, sBuySell);
        valuemap.setInt(O2GRequestParamsEnum.AMOUNT, iAmount);
        valuemap.setDouble(O2GRequestParamsEnum.RATE, dRate);
        valuemap.setString(O2GRequestParamsEnum.CUSTOM_ID, sCustomID);
        return valuemap;
    }

The namespace is com.fxcore2.

Public Methods

appendChild

Adds the value map to the list of child value maps.

clear

Clears the value map.

clone

Makes a copy of the value map.

getChild

Gets a child value map.

getChildrenCount

Gets the number of child value maps.

iterator

Returns an iterator that allows an object to be the target of the "foreach" statement.

setBoolean

Sets a boolean value.

setDouble

Sets a double value.

setInt

Sets an integer value.

setString

Sets a string value.

back