public class ObjectConditionsWithTarget extends BasicName implements Condition
Modifier and Type | Class and Description |
---|---|
static class |
ObjectConditionsWithTarget.Target |
Constructor and Description |
---|
ObjectConditionsWithTarget() |
ObjectConditionsWithTarget(ObjectConditionsWithTarget.Target target) |
ObjectConditionsWithTarget(ObjectConditionsWithTarget oct) |
Modifier and Type | Method and Description |
---|---|
void |
addDimension(Dimension dimension)
Add new dimensions to an instance of
Dimensional . |
void |
addDimension(java.lang.Long dimension)
Add new fixed dimensions to an instance of
Dimensional . |
void |
addDimension(java.lang.String dimension)
Add new formula dimensions to an instance of dimension.
|
void |
addObjectCondition(ObjectCondition oc) |
ObjectConditionsWithTarget |
deepClone()
Clone the name
|
int |
fetch(Membrane membrane,
int times)
fetch objects from membrane
|
void |
fix(java.util.Map<java.lang.String,java.lang.Object> mappedValues)
Fix all the dimension by calculating them using the mapped values
|
Dimension |
get(int i)
Get the i-th dimension
|
java.util.ArrayList<Dimension> |
getDimensions()
Get all the dimensions of an instance
|
int |
getDimensionSize()
Return the number of total dimensions
|
java.util.List<ObjectCondition> |
getObjectConditions() |
ObjectConditionsWithTarget.Target |
getTarget() |
java.util.List<java.lang.Long[]> |
predictPossibleValue(Membrane membrane,
java.util.List<Dimension> dList)
Predict the possible values in this membrane
|
int |
satisfy(Membrane membrane)
check if condition satisfy the situation in membrane.
|
void |
setTarget(ObjectConditionsWithTarget.Target target) |
java.lang.String |
toString() |
void |
withdrawFetch(Membrane membrane,
int times)
If some conditions in one rule cannot fetch the objects then the conditions
which have fetched the objects they need withdraw the objects they have
fetched.
|
getName, getNameDim, isFixed, predictPossibleValueOfNeighbor, predictPossibleValueOfObjects, predictPossibleValueOfSubmembrane, setName
public ObjectConditionsWithTarget(ObjectConditionsWithTarget.Target target)
public ObjectConditionsWithTarget()
public ObjectConditionsWithTarget(ObjectConditionsWithTarget oct)
public void addDimension(Dimension dimension)
Dimensional
Dimensional
. For example, a[i+1]
have a dimension i+1
and i+1
should be added to a
.addDimension
in interface Dimensional
addDimension
in class BasicName
dimension
- dimensionspublic void addDimension(java.lang.Long dimension)
Dimensional
Dimensional
. For example,
a[1] have a dimension 1
and 1
should be added to a
.addDimension
in interface Dimensional
addDimension
in class BasicName
dimension
- dimensionspublic void addDimension(java.lang.String dimension)
Dimensional
i+1
and i+1
should be added to a
.addDimension
in interface Dimensional
addDimension
in class BasicName
dimension
- dimensionspublic ObjectConditionsWithTarget.Target getTarget()
public void setTarget(ObjectConditionsWithTarget.Target target)
public void addObjectCondition(ObjectCondition oc)
public java.util.List<ObjectCondition> getObjectConditions()
public int satisfy(Membrane membrane)
Condition
public java.util.ArrayList<Dimension> getDimensions()
Dimensional
getDimensions
in interface Dimensional
getDimensions
in class BasicName
public Dimension get(int i)
Dimensional
get
in interface Dimensional
get
in class BasicName
i
- index of dimension wantedpublic int getDimensionSize()
Dimensional
getDimensionSize
in interface Dimensional
getDimensionSize
in class BasicName
public java.util.List<java.lang.Long[]> predictPossibleValue(Membrane membrane, java.util.List<Dimension> dList)
Dimensional
predictPossibleValue
in interface Dimensional
predictPossibleValue
in class BasicName
membrane
- targetMembranedList
- the list of dimensions which want to be predicted their valuepublic int fetch(Membrane membrane, int times)
Condition
public void withdrawFetch(Membrane membrane, int times)
Condition
withdrawFetch
in interface Condition
membrane
- the membrane current condition withdraw objects totimes
- withdraw fetch timespublic void fix(java.util.Map<java.lang.String,java.lang.Object> mappedValues)
Dimensional
fix
in interface Dimensional
fix
in class BasicName
mappedValues
- mapped valuespublic ObjectConditionsWithTarget deepClone()
Name
public java.lang.String toString()
toString
in class java.lang.Object