|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.combi.CombinationState
public class CombinationState
Immutable class contains state information used by combination strategies.
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,
Probability myProb)
Creates a new instance, setting isDiscardPreceding() to
false . |
|
CombinationState(String myType,
boolean myBegin,
boolean myEnd,
Probability myProb,
boolean discardPrevious)
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. |
Probability |
getProbability()
Returns the probability of this instance. |
String |
getType()
Returns the type (class) of the current instance; or null
if we're outside of any instance (OUTSIDE ). |
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 |
isDiscardPreceding()
Signals that the extraction in progress during the preceding combination state should be discarded. |
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 |
---|
public static final CombinationState OUTSIDE
null
). Begin and end are always false
,
probability is null
.
Constructor Detail |
---|
public CombinationState(String myType, boolean myBegin, boolean myEnd, Probability myProb)
isDiscardPreceding()
to
false
.
myType
- the type (class) of this instance; or null
if
we're outside of any instancemyBegin
- whether this is the begin of an instancemyEnd
- whether this is the end of an instancemyProb
- the probability of this state; or null
if
unknown/unspecifiedpublic CombinationState(String myType, boolean myBegin, boolean myEnd, Probability myProb, boolean discardPrevious)
myType
- the type (class) of this instance; or null
if
we're outside of any instancemyBegin
- whether this is the begin of an instancemyEnd
- whether this is the end of an instancemyProb
- the probability of this state; or null
if
unknown/unspecifieddiscardPrevious
- whether the extraction in progress during the
preceding combination state should be discardedMethod Detail |
---|
public boolean equals(Object obj)
Object.equals(java.lang.Object)
contract.
equals
in class Object
obj
- the reference object with which to compare
true
iff the specified object is a
CombinationState
equal to this instancepublic Probability getProbability()
null
if
unknown/unspecifiedpublic String getType()
null
if we're outside of any instance (OUTSIDE
).
public int hashCode()
Object.hashCode()
contract.
hashCode
in class Object
public boolean isBegin()
public boolean isDiscardPreceding()
public boolean isEnd()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |