edu.vt.marian.search
Class EmptyWtdObjSet

java.lang.Object
  |
  +--edu.vt.marian.search.EmptyWtdObjSet

public class EmptyWtdObjSet
extends java.lang.Object
implements WtdObjSet

The Weighted Object Set with no elements.

JDK Version : 1.1.5

See Also:
WtdObjSet, EmptyWtdObjSetEnum

Field Summary
protected  edu.vt.marian.common.Debug debug
           
 
Constructor Summary
EmptyWtdObjSet(edu.vt.marian.common.Debug d)
           
 
Method Summary
 int approxSize()
          Return the approximate number of elements in this set (can be cheap and dirty).
 WtdObjSetEnumeration elements()
          Create an Enumeration -- actually a WtdObjSetEnumeration -- for this set.
 int exactSize()
          Return the exact number of elements in this set (may be costly).
 edu.vt.marian.common.Weight isElt(edu.vt.marian.common.FullID id)
          Is a given ID an element of this set?
 boolean isEmpty()
          Is this set empty?
 int maxSize()
          Return the maximum number of elements in this set (can be cheap and dirty).
 java.lang.String profile()
          Return a short human-readable string that quickly describes this set.
 java.lang.String toString()
          Return a human-readable string for this entire set (may be large).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

protected edu.vt.marian.common.Debug debug
Constructor Detail

EmptyWtdObjSet

public EmptyWtdObjSet(edu.vt.marian.common.Debug d)
Method Detail

elements

public WtdObjSetEnumeration elements()
Create an Enumeration -- actually a WtdObjSetEnumeration -- for this set.
Specified by:
elements in interface WtdObjSet

isEmpty

public boolean isEmpty()
Is this set empty?
Specified by:
isEmpty in interface WtdObjSet
Returns:
true / false

isElt

public edu.vt.marian.common.Weight isElt(edu.vt.marian.common.FullID id)
Is a given ID an element of this set?
Specified by:
isElt in interface WtdObjSet
Parameters:
id - The (ID of the) element to be tested.
Returns:
null -- the element is not in the set.
any valid Weight -- the element is in the set with that Weight.

exactSize

public int exactSize()
Return the exact number of elements in this set (may be costly).
Specified by:
exactSize in interface WtdObjSet

approxSize

public int approxSize()
Return the approximate number of elements in this set (can be cheap and dirty).
Specified by:
approxSize in interface WtdObjSet

maxSize

public int maxSize()
Return the maximum number of elements in this set (can be cheap and dirty).
Specified by:
maxSize in interface WtdObjSet

toString

public java.lang.String toString()
Return a human-readable string for this entire set (may be large).
Specified by:
toString in interface WtdObjSet
Overrides:
toString in class java.lang.Object

profile

public java.lang.String profile()
Return a short human-readable string that quickly describes this set.
Specified by:
profile in interface WtdObjSet