ca.mcgill.lmp.finite
Class State

java.lang.Object
  extended byca.mcgill.lmp.finite.State

public class State
extends java.lang.Object

A state in a LMP.

Author:
Alexandre Bouchard

Constructor Summary
State(int index)
          Create a state with the provided index.
State(int index, java.lang.Object description)
          Create a state with the provided index.
 
Method Summary
 boolean equals(java.lang.Object state2)
          this is equal to state2 iff state2 is an instance of State and they have the same index.
 java.lang.Object getDescription()
           
 int getIndex()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

State

public State(int index)
Create a state with the provided index. (Used as an index in transition matrices).

Parameters:
index -

State

public State(int index,
             java.lang.Object description)
Create a state with the provided index. (Used as an index in transition matrices), and a description of that state.

Parameters:
index -
description -
Method Detail

toString

public java.lang.String toString()
Returns:
The string representation of the description.

getDescription

public java.lang.Object getDescription()
Returns:

getIndex

public int getIndex()
Returns:

equals

public boolean equals(java.lang.Object state2)
this is equal to state2 iff state2 is an instance of State and they have the same index.

Parameters:
state2 -
Returns:

hashCode

public int hashCode()
Returns:
The index of this State.