blog
Class NonGuaranteedObject

java.lang.Object
  extended by blog.NonGuaranteedObject

public class NonGuaranteedObject
extends java.lang.Object


Method Summary
 int compareTo(java.lang.Object o)
          Compares this non-guaranteed object to another one.
static NonGuaranteedObject get(NumberVar generatedFrom, int num)
           
static NonGuaranteedObject get(POP pop, java.lang.Object[] genObjs, int num)
           
 int getDepth()
          Returns the depth of nesting in this tuple.
 java.lang.Object[] getGenObjs()
           
 int getNumber()
           
 NumberVar getNumberVar()
          Returns the number variable whose value determines whether this non-guaranteed object exists or not.
 java.lang.Object getOriginFuncValue(OriginFunction originFunc)
          Returns the value of the given origin function on this object.
 POP getPOP()
           
 Type getType()
          Returns the BLOG type of this non-guaranteed object.
 java.lang.String toString()
          Returns the tuple representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

get

public static NonGuaranteedObject get(POP pop,
                                      java.lang.Object[] genObjs,
                                      int num)

get

public static NonGuaranteedObject get(NumberVar generatedFrom,
                                      int num)

getNumber

public final int getNumber()

getPOP

public final POP getPOP()

getGenObjs

public final java.lang.Object[] getGenObjs()

getOriginFuncValue

public java.lang.Object getOriginFuncValue(OriginFunction originFunc)
Returns the value of the given origin function on this object.


getType

public Type getType()
Returns the BLOG type of this non-guaranteed object.


getNumberVar

public NumberVar getNumberVar()
Returns the number variable whose value determines whether this non-guaranteed object exists or not.


getDepth

public int getDepth()
Returns the depth of nesting in this tuple. A guaranteed object or an object generated by the empty tuple has depth zero. The depth of any other object is one more than the maximum depth of its generating objects.


toString

public java.lang.String toString()
Returns the tuple representation of this object.

Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object o)
Compares this non-guaranteed object to another one. The objects are first compared by depth: shallower objects come first. Objects of the same depth are compared lexicographically according to their lists of generating objects. Objects with the same generating objects but different POPs are compared according to the order in which their POPs were defined. Finally, objects from the same POP application are compared by their indices.