uchicago.src.sim.gui
Class ProbeableNumber

java.lang.Object
  extended by uchicago.src.sim.gui.ProbeableNumber
All Implemented Interfaces:
CustomProbeable

public class ProbeableNumber
extends java.lang.Object
implements CustomProbeable

Turns a primitive number into an Object that can be probed. This is used to make spaces that contain primitive numbers probeable.


Constructor Summary
ProbeableNumber(int x, int y, Discrete2DSpace grid, java.lang.Object o)
          Creates a Probeable number with the specified coordinates, in the specified grid, out of the specified object.
 
Method Summary
 java.lang.String[] getProbedProperties()
          Returns a list of properties suitable for probing.
 double getVal()
          Gets the primitive value of the the number.
 int getX()
          Gets the x coordinate.
 int getY()
          Gets the y coordinate.
 void setVal(double val)
          Sets the value of the number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProbeableNumber

public ProbeableNumber(int x,
                       int y,
                       Discrete2DSpace grid,
                       java.lang.Object o)
Creates a Probeable number with the specified coordinates, in the specified grid, out of the specified object.

Parameters:
x - the x coordinate for this number
y - the y coordinate for this number
grid - the grid from where this number came
o - the primitive wrapper (e.g. Double) that carries the value of the number
Method Detail

getX

public int getX()
Gets the x coordinate.


getY

public int getY()
Gets the y coordinate.


getVal

public double getVal()
Gets the primitive value of the the number.


setVal

public void setVal(double val)
Sets the value of the number.


getProbedProperties

public java.lang.String[] getProbedProperties()
Returns a list of properties suitable for probing.

Specified by:
getProbedProperties in interface CustomProbeable
Returns:
an array of the property names.