Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fxcm.fix
Class PositionQty

    java.lang.Object
      com.fxcm.fix.PositionQty

    public class PositionQty

extends Object

PositionQty component block. Used to specify position qty

Constructor Summary
`PositionQty()` Empty constructor.
`PositionQty(double aLongQty, double aShortQty)` Constructor with full set of fields.
`PositionQty(ISide aSide, double aQty)`

Method Summary
`boolean` | `equals(Object aObj)` Checks if a PositionAmountData object is equal to this PositionAmountData object.
`boolean` | `fill(PositionQty aOrig)` Fills out object state.
`double` | `getLongQty()` Obtains long qty (if side is BUY, 0 otherwise).
`double` | `getQty()` convenience method to get the qty whether its short or long
`double` | `getShortQty()` Obtains short qty (if side is SELL, 0 otherwise).
`ISide` | `getSide()`
`void` | `setLongQty(double aLongQty)` Updates long quantity.
`void` | `setShortQty(double aShortQty)` Updates short quantity.
`void` | `setSideQty(ISide aSide, double aQty)`
`String` | `toString()`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PositionQty

    public PositionQty()

  Empty constructor.

### PositionQty

    public PositionQty(double aLongQty,
                       double aShortQty)

  Constructor with full set of fields.

  Parameters:
    `aLongQty` - Quantity of position if side is BUY, 0 otherwise
    `aShortQty` - Quantity of position if side is SELL, 0 otherwise

### PositionQty

    public PositionQty(ISide aSide,
                       double aQty)

Method Detail

### getSide

    public ISide getSide()

### getShortQty

    public double getShortQty()

  Obtains short qty (if side is SELL, 0 otherwise).

  Returns:
    The quantity of position if side is SELL.

### getLongQty

    public double getLongQty()

  Obtains long qty (if side is BUY, 0 otherwise).

  Returns:
    The quantity of position if side is BUY.

### getQty

    public double getQty()

  convenience method to get the qty whether its short or long

### setSideQty

    public void setSideQty(ISide aSide,
                           double aQty)

### setShortQty

    public void setShortQty(double aShortQty)

  Updates short quantity. Use only if position side is SELL.

  Parameters:
    `aShortQty` - Sell side amount

### setLongQty

    public void setLongQty(double aLongQty)

  Updates long quantity. Use only if position side is BUY.

  Parameters:
    `aLongQty` - Buy side amount.

### equals

    public boolean equals(Object aObj)

  Checks if a PositionAmountData object is equal to this PositionAmountData object.

  Overrides:
    `equals` in class `Object`
  Parameters:
    `aObj` - Code object to compare.
  Returns:
    `true` if codes are the same; `false` otherwise.

### fill

    public boolean fill(PositionQty aOrig)

  Fills out object state.

  Parameters:
    `aOrig` - Object to copy state from.
  Returns:
    `true` if state is updated successfully; `false` otherwise.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 FXCM, LLC. All Rights Reserved.