|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.coweb.oe.ContextVector
public class ContextVector
| Constructor Summary | |
|---|---|
ContextVector(Map<String,Object> args)
|
|
| Method Summary | |
|---|---|
int |
compare(ContextVector cv)
Computes an ordered comparison of two context vectors according to the sequence IDs at each site. |
ContextVector |
copy()
Makes an independent copy of this context vector. |
int[] |
copySites()
Makes an independent copy of the array in this context vector. |
boolean |
equals(ContextVector cv)
Determines if this context vector equals the other in terms of the sequence IDs at each site. |
int |
getSeqForSite(int site)
Gets the sequence number for the given site in this context vector. |
int[] |
getSites()
|
int |
getSize()
Gets the size of this context vector. |
int[] |
getState()
Serializes this context vector. |
void |
growTo(int count)
Increases the size of the context vector to the given size. |
ContextDifference |
oldestDifference(ContextVector cv)
Finds the oldest sequence number in the difference in sequence numbers for each site between this context and the one provided. |
void |
setSeqForSite(int site,
int seq)
Sets the sequence number for the given site in this context vector. |
ContextDifference |
subtract(ContextVector cv)
Computes the difference in sequence numbers at each site between this context vector and the one provided. |
String |
toString()
Converts the contents of this context vector sites array to a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ContextVector(Map<String,Object> args)
throws OperationEngineException
OperationEngineException| Method Detail |
|---|
public String toString()
toString in class Objectpublic int[] getState()
public ContextVector copy()
throws OperationEngineException
OperationEngineExceptionpublic int[] copySites()
public ContextDifference subtract(ContextVector cv)
{ContextVector} - cv Other context vector objectpublic ContextDifference oldestDifference(ContextVector cv)
{ContextVector} - cv Other context vector objectpublic void growTo(int count)
{Number} - count Desired integer size of the vectorpublic int getSeqForSite(int site)
{Number} - site Integer site ID
public void setSeqForSite(int site,
int seq)
{Number} - site Integer site ID{Number} - seq Integer sequence numberpublic int getSize()
public boolean equals(ContextVector cv)
{ContextVector} - cv Other context vectorpublic int compare(ContextVector cv)
{ContextVector} - cv Other context vectorpublic int[] getSites()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||