de.fu_berlin.ties.combi
Class CombinationState

java.lang.Object
  extended byde.fu_berlin.ties.combi.CombinationState

public class CombinationState
extends Object

Immutable class contains state information used by combination strategies.

Version:
$Revision: 1.2 $, $Date: 2004/03/19 17:56:15 $, $Author: siefkes $
Author:
Christian Siefkes

Field Summary
static CombinationState OUTSIDE
          Combination state to be used for outside/other (type is set to null).
 
Constructor Summary
CombinationState(String myType, boolean myBegin, boolean myEnd)
          Creates a new instance.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one, fulfulling the Object.equals(java.lang.Object) contract.
 String getType()
          Returns the type (class) of the current instance; or null if we're outside of any instance.
 int hashCode()
          Returns a hash code value for this object, fulfulling the Object.hashCode() contract.
 boolean isBegin()
          Returns whether this is the begin of an instance.
 boolean isEnd()
          Returns whether this is the end of an instance.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

OUTSIDE

public static final CombinationState OUTSIDE
Combination state to be used for outside/other (type is set to null). (Begin and end are set to false, but for "other" they are generally ignored anyway).

Constructor Detail

CombinationState

public CombinationState(String myType,
                        boolean myBegin,
                        boolean myEnd)
Creates a new instance.

Parameters:
myType - the type (class) of this instance; or null if we're outside of any instance
myBegin - whether this is the begin of an instance
myEnd - whether this is the end of an instance
Method Detail

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one, fulfulling the Object.equals(java.lang.Object) contract.

Parameters:
obj - the reference object with which to compare
Returns:
true iff the specified object is a CombinationState equal to this instance

getType

public String getType()
Returns the type (class) of the current instance; or null if we're outside of any instance.

Returns:
the value of the attribute

hashCode

public int hashCode()
Returns a hash code value for this object, fulfulling the Object.hashCode() contract.

Returns:
a hash code value for this object

isBegin

public boolean isBegin()
Returns whether this is the begin of an instance.

Returns:
the value of the attribute

isEnd

public boolean isEnd()
Returns whether this is the end of an instance.

Returns:
the value of the attribute

toString

public String toString()
Returns a string representation of this object.

Returns:
a textual representation


Copyright © 2003-2004 Christian Siefkes. All Rights Reserved.