|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmdp.basic.State
jmdp.basic.StateArray
public abstract class StateArray
This class is an easy way to use a state that is represented by an array of ints. The internal array can be accessed by the implementing classes.
Field Summary | |
---|---|
protected int[] |
status
The internal array used to represent the state |
Constructor Summary | |
---|---|
StateArray(int size)
This creates an StateArray with the internal array of ceros of the given size. |
|
StateArray(int[] status)
This creates an StateArray with the given array. |
Method Summary | |
---|---|
int |
compareTo(State s)
|
int |
compareTo(StateArray s1)
Compares the properties in order. |
int |
getProperty(int i)
Returns the value of the i-th property. |
int |
hashCode()
|
java.lang.String |
label()
The default label is in the form (s1,s2,... |
Methods inherited from class jmdp.basic.State |
---|
equals, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int[] status
Constructor Detail |
---|
public StateArray(int[] status)
status
- public StateArray(int size)
size
- The size of the array.Method Detail |
---|
public java.lang.String label()
label
in class State
State.label()
public final int compareTo(StateArray s1)
s1
- array to compare with
public final int compareTo(State s)
public int hashCode()
hashCode
in class java.lang.Object
public int getProperty(int i)
i
- index of the property
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |