|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinpro.incremental.unit.IU
public abstract class IU
Nested Class Summary | |
---|---|
static interface |
IU.IUUpdateListener
|
static class |
IU.Progress
types of temporal progress states the IU may be in |
Field Summary | |
---|---|
private boolean |
committed
|
protected long |
creationTime
|
static IU |
FIRST_IU
|
protected java.util.List<IU> |
groundedIn
|
protected java.util.List<IU> |
grounds
|
private int |
id
|
private static int |
IU_idCounter
|
protected IUList<IU> |
nextSameLevelLinks
|
protected IU |
previousSameLevelLink
|
private boolean |
revoked
|
(package private) java.util.List<IU.IUUpdateListener> |
updateListeners
|
Constructor Summary | |
---|---|
IU()
this constructor must be called in order to acquire an IU with a valid ID. |
|
IU(IU sll)
call this, if you want to provide a sameLevelLink |
|
IU(IU sll,
java.util.List<? extends IU> groundedIn)
call this, if you want to provide both a sameLevelLink and a groundedIn list |
|
IU(IU sll,
java.util.List<? extends IU> groundedIn,
boolean deepSLL)
call this, if you want to provide a sameLevelLink and a groundedIn list and you want groundedIn to be deeply SLLed to the sameLevelLink's groundedIn-IUs |
|
IU(java.util.List<? extends IU> groundedIn)
|
Method Summary | |
---|---|
void |
addNextSameLevelLink(IU iu)
|
void |
addUpdateListener(IU.IUUpdateListener listener)
this has no effect if listener is already in the list of updatelisteners |
void |
commit()
COMMITs this IU. |
int |
compareTo(IU other)
the natural ordering of IUs is based on the IU's ids: IUs with lower ids come first |
void |
connectSLL(IU link)
|
java.lang.String |
deepToString()
|
double |
duration()
|
double |
endTime()
return the end of the timespan this IU covers |
boolean |
equals(java.lang.Object iu)
two IUs are equal if their IDs are the same |
long |
getAge()
|
IU |
getAmongNextSameLevelLinks(java.lang.String bestFollowerPayload)
get the IU among the nextSLLs with the given payload |
long |
getCreationTime()
|
int |
getID()
get the ID assigned to this IU |
private static int |
getNewID()
called to acquire a new ID |
IU |
getNextSameLevelLink()
|
java.util.List<IU> |
getNextSameLevelLinks()
return the (possibly empty) list of next SLLs |
IU |
getOngoingGroundedIU()
return the IU that is ongoing among the groundedIn links |
IU.Progress |
getProgress()
by default, an IU - is complete if the last grounding unit is complete, - is upcoming if the first grounding unit is upcoming, - is ongoing if inbetween those two states - is null if there are no grounding units. |
IU |
getSameLevelLink()
|
void |
ground(IU iu)
|
java.util.List<? extends IU> |
groundedIn()
|
void |
groundIn(IU iu)
|
void |
groundIn(java.util.List<IU> ius)
|
java.util.List<? extends IU> |
grounds()
|
int |
hashCode()
IDs make for ideal hash codes |
boolean |
isCommitted()
|
boolean |
isCompleted()
|
boolean |
isOngoing()
|
boolean |
isRevoked()
|
boolean |
isUpcoming()
|
private void |
newGroundingNextSameLevelLinksOrder(java.util.List<IU> aboveNextSameLevelLinks)
this is needed to (recursively) correct nextSameLevelLinks in groundedIn IUs |
void |
notifyListeners()
|
boolean |
payloadEquals(IU iu)
compares IUs based on their payload (i.e., ignoring differing IDs) equals() implies payloadEquals(), but not the other way around |
void |
removeAllNextSameLevelLinks()
recursively remove (in grounded IUs) all nextsamelevellinks |
void |
removeGrin(IU iu)
|
void |
removeGrin(java.util.List<IU> ius)
|
void |
reorderNextSameLevelLink(java.util.Comparator<IU> order)
|
void |
revoke()
COMMITs this IU. |
void |
setAsTopNextSameLevelLink(java.lang.String bestFollowerPayload)
|
void |
setSameLevelLink(IU link)
|
double |
startTime()
return the start of the timespan this IU covers |
java.lang.String |
toLabelLine()
|
abstract java.lang.String |
toPayLoad()
|
java.lang.String |
toString()
|
java.lang.String |
toTEDviewXML()
|
void |
updateOnGrinUpdates()
registers an update listener with all groundedIn-IUs that call our own update listeners |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final IU FIRST_IU
private static int IU_idCounter
private final int id
protected IU previousSameLevelLink
protected IUList<IU> nextSameLevelLinks
protected java.util.List<IU> groundedIn
protected java.util.List<IU> grounds
protected long creationTime
private boolean committed
private boolean revoked
java.util.List<IU.IUUpdateListener> updateListeners
Constructor Detail |
---|
public IU(IU sll, java.util.List<? extends IU> groundedIn, boolean deepSLL)
public IU(IU sll, java.util.List<? extends IU> groundedIn)
public IU(java.util.List<? extends IU> groundedIn)
public IU(IU sll)
public IU()
Method Detail |
---|
private static int getNewID()
public final int getID()
public void setSameLevelLink(IU link)
public void addNextSameLevelLink(IU iu)
public IU getSameLevelLink()
public java.util.List<IU> getNextSameLevelLinks()
public void removeAllNextSameLevelLinks()
public IU getNextSameLevelLink()
public void setAsTopNextSameLevelLink(java.lang.String bestFollowerPayload)
public IU getAmongNextSameLevelLinks(java.lang.String bestFollowerPayload)
public void reorderNextSameLevelLink(java.util.Comparator<IU> order)
private void newGroundingNextSameLevelLinksOrder(java.util.List<IU> aboveNextSameLevelLinks)
public void connectSLL(IU link)
public double startTime()
public double endTime()
public double duration()
public java.util.List<? extends IU> groundedIn()
public java.util.List<? extends IU> grounds()
public boolean equals(java.lang.Object iu)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean payloadEquals(IU iu)
public boolean isCommitted()
public void commit()
public boolean isRevoked()
public void revoke()
public void ground(IU iu)
public void removeGrin(java.util.List<IU> ius)
public void removeGrin(IU iu)
public void groundIn(java.util.List<IU> ius)
public void groundIn(IU iu)
public boolean isUpcoming()
public boolean isOngoing()
public boolean isCompleted()
public IU.Progress getProgress()
public IU getOngoingGroundedIU()
public abstract java.lang.String toPayLoad()
public java.lang.String toLabelLine()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String deepToString()
public java.lang.String toTEDviewXML()
public long getCreationTime()
public long getAge()
public int compareTo(IU other)
compareTo
in interface java.lang.Comparable<IU>
public void addUpdateListener(IU.IUUpdateListener listener)
public void notifyListeners()
public void updateOnGrinUpdates()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |