|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmarkov.basic.Action
jmarkov.basic.PropertiesAction
public class PropertiesAction
This class is an easy way to use a Action that is represented by an integer valued array.
Constructor Summary | |
---|---|
PropertiesAction(int size)
Creates an Action Object wit an array of the given size. |
|
PropertiesAction(int[] properties)
Builds an object with the given array. |
Method Summary | |
---|---|
PropertiesAction |
clone()
|
int |
compareTo(Action a)
|
int |
compareTo(PropertiesAction a)
|
int |
getNumProps()
Returns the number of properties in the array that characterize this element. |
int[] |
getProperties()
Gets thae array of properties. |
int |
getProperty(int index)
Gets the value of this property. |
java.lang.String |
label()
The user MUST override this method to give a (hopefully short) label for the Action. |
protected void |
setProperty(int index,
int value)
Sets the value of the property at the given index |
Methods inherited from class jmarkov.basic.Action |
---|
description, equals, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jmarkov.basic.JMarkovElement |
---|
description, equals, toString |
Constructor Detail |
---|
public PropertiesAction(int[] properties)
properties
- public PropertiesAction(int size)
size
- Method Detail |
---|
public java.lang.String label()
Action
label
in interface JMarkovElement
label
in class Action
JMarkovElement.description()
public final int compareTo(PropertiesAction a)
a
- The action array to compare to
Comparable.compareTo(T)
public final int compareTo(Action a)
compareTo
in interface java.lang.Comparable<Action>
public final int[] getProperties()
getProperties
in interface PropertiesElement
public int getProperty(int index)
getProperty
in interface PropertiesElement
index
-
protected void setProperty(int index, int value)
index
- value
- public int getNumProps()
getNumProps
in interface PropertiesElement
public PropertiesAction clone()
clone
in interface PropertiesElement
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |