eaLib API Docs
Last Modified : January 7 2002

mss.ea.al
Class ElementState

java.lang.Object
  |
  +--mss.ea.al.ElementState

public class ElementState
extends java.lang.Object

Class for representing the state of flow elements.

Since:
0.2
Version:
$Revision: 1.3 $ $Date: 2001/11/13 09:58:50 $
Author:
Andreas Rummler

Field Summary
static ElementState DEAD
          Element state DEAD.
protected  long encoding
          Encoding of this state.
protected  java.lang.String name
          Textual representation of this state.
static ElementState OVERFLOW
          Element state OVERFLOW.
static ElementState READY
          Element state READY.
static ElementState UNKNOWN
          Element state UNKNOWN.
 
Constructor Summary
protected ElementState(java.lang.String name, long stateEncoding)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Performs an equality check.
 long getEncoding()
          Get the encoding of this state.
 java.lang.String getName()
          Get the textual representation of this state.
 java.lang.String toString()
          Returns a string representation of this state.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final ElementState UNKNOWN
Element state UNKNOWN.

READY

public static final ElementState READY
Element state READY.

DEAD

public static final ElementState DEAD
Element state DEAD.

OVERFLOW

public static final ElementState OVERFLOW
Element state OVERFLOW.

encoding

protected long encoding
Encoding of this state. This number is used to check the equality of states.

name

protected java.lang.String name
Textual representation of this state.
Constructor Detail

ElementState

protected ElementState(java.lang.String name,
                       long stateEncoding)
Constructor.
Parameters:
name - textual representation of this state
stateEncoding - long encoding
Method Detail

getEncoding

public long getEncoding()
Get the encoding of this state.
Returns:
encoding

getName

public java.lang.String getName()
Get the textual representation of this state.
Returns:
textual representation

equals

public boolean equals(java.lang.Object obj)
Performs an equality check. In this check a cast to ElemetState of the given object is performed and both encodings are compared.
Overrides:
equals in class java.lang.Object
Parameters:
obj - element state to compare to
Returns:
true, if encodings are equal, false otherwise

toString

public java.lang.String toString()
Returns a string representation of this state.
Overrides:
toString in class java.lang.Object
Returns:
string representation

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS