cacheRunner
Class Position

java.lang.Object
  extended by cacheRunner.Position
All Implemented Interfaces:
Declarable, Serializable

public class Position
extends Object
implements Declarable, Serializable

Represents a number of shares of a stock ("security") held in a Portfolio.

This class is Serializable because we want it to be distributed to multiple members of a distributed system. Because this class is Declarable, we can describe instances of it in a GemFire cache.xml file.

Since:
4.0
Author:
GemStone Systems, Inc.
See Also:
Serialized Form

Constructor Summary
Position()
           
 
Method Summary
 double getMktValue()
          Returns the value of this position.
 double getQty()
          Returns the number of shares held in this position.
 String getSecId()
          Returns the id of the security held in this position.
 void init(Properties props)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Position

public Position()
Method Detail

init

public void init(Properties props)
Specified by:
init in interface Declarable

getSecId

public String getSecId()
Returns the id of the security held in this position.


getQty

public double getQty()
Returns the number of shares held in this position.


getMktValue

public double getMktValue()
Returns the value of this position.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2008 GemStone Systems, Inc. All Rights Reserved.