public class Barrier extends BaseContainer
Constructor and Description |
---|
Barrier()
Default constructor
|
Barrier(Barrier input)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize()
Cleans up underlying C resources
|
void |
free()
Deletes the C instantiation.
|
static Barrier |
fromPointer(long cptr)
Creates a java object instance from a C/C++ pointer
|
static Barrier |
fromPointer(long cptr,
boolean shouldManage)
Creates a java object instance from a C/C++ pointer
|
long |
get()
Gets the value
|
java.lang.String |
getName()
Gets the name of the variable
|
boolean |
isDone()
Checks to see if the barrier round is done
|
boolean |
isFalse()
Returns true if the container evaluates to false
|
boolean |
isTrue()
Returns true if the container evaluates to true
|
void |
modify()
Mark the value as modified.
|
void |
next()
Moves to the next barrier
|
void |
resize(int id,
int participants)
Resizes the barrier, usually when number of participants change
|
void |
setName(KnowledgeBase kb,
java.lang.String name,
int id,
int participants)
Sets the name and knowledge base being referred to
|
void |
setName(Variables vars,
java.lang.String name,
int id,
int participants)
Sets the name and knowledge base being referred to
|
void |
setSettings(UpdateSettings settings)
Sets the settings for updating variables in the Knowledge Base
|
double |
toDouble()
Converts the value to a double
|
long |
toLong()
Converts the value to a long
|
java.lang.String |
toString()
Converts the value to a string
|
modifyIfFalse, modifyIfTrue
public Barrier()
public Barrier(Barrier input)
input
- instance to copypublic static Barrier fromPointer(long cptr)
cptr
- C pointer to the objectpublic static Barrier fromPointer(long cptr, boolean shouldManage)
cptr
- C pointer to the objectshouldManage
- if true, manage the pointerpublic long get()
public java.lang.String getName()
public void next()
public boolean isDone()
public void modify()
public void resize(int id, int participants)
id
- the id of this barrier in the barrier ringparticipants
- the number of participants in barrier ringpublic void setName(KnowledgeBase kb, java.lang.String name, int id, int participants)
kb
- the knowledge base that contains the namename
- the variable nameid
- the id of the barrier in the barrier ringparticipants
- the number of participants in the barrier ringpublic void setName(Variables vars, java.lang.String name, int id, int participants)
vars
- the variables facade that contains the namename
- the variable nameid
- the id of the barrier in the barrier ringparticipants
- the number of participants in the barrier ringpublic void setSettings(UpdateSettings settings)
settings
- the settings to use for updating the Knowledge Basepublic double toDouble()
public long toLong()
public boolean isTrue()
public boolean isFalse()
public java.lang.String toString()
public void free()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- necessary for override but unused