org.qedeq.kernel.se.state
Class AbstractState

java.lang.Object
  extended by org.qedeq.kernel.se.state.AbstractState
All Implemented Interfaces:
State
Direct Known Subclasses:
DependencyState, FormallyProvedState, LoadingImportsState, LoadingState, WellFormedState

public abstract class AbstractState
extends java.lang.Object
implements State

Represents a module state. All existing instances of this class should be unique.

Author:
Michael Meyling

Constructor Summary
protected AbstractState(java.lang.String text, boolean failure, int code)
          Creates new module state.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getCode()
          Get module state code.
 java.lang.String getText()
          Get meaning of module state.
 int hashCode()
           
 boolean isFailure()
          Is this a failure state?
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractState

protected AbstractState(java.lang.String text,
                        boolean failure,
                        int code)
Creates new module state.

Parameters:
text - meaning of this state, null is not permitted.
failure - is this a failure state?
code - code of this state.
Throws:
java.lang.IllegalArgumentException - text == null
Method Detail

getText

public java.lang.String getText()
Description copied from interface: State
Get meaning of module state.

Specified by:
getText in interface State
Returns:
meaning of module state.

isFailure

public boolean isFailure()
Description copied from interface: State
Is this a failure state?

Specified by:
isFailure in interface State
Returns:
is this a failure state?

getCode

public int getCode()
Description copied from interface: State
Get module state code.

Specified by:
getCode in interface State
Returns:
Module state.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2014. All Rights Reserved.