public class EffectList extends Object implements Iterable<EffectList.Effect>
EffectList
can be used to maintain a list of EffectList.Effect
s and backtrack to a
previous state by truncating the list.Modifier and Type | Class and Description |
---|---|
static interface |
EffectList.Effect |
static interface |
EffectList.SimpleEffect |
Modifier and Type | Field and Description |
---|---|
private EffectList.Effect[] |
effects |
private static EffectList.Effect[] |
EMPTY_ARRAY |
private static String[] |
EMPTY_STRING_ARRAY |
private String[] |
names |
private int |
size |
Constructor and Description |
---|
EffectList() |
Modifier and Type | Method and Description |
---|---|
void |
add(String name,
EffectList.Effect effect) |
void |
add(String name,
EffectList.SimpleEffect effect) |
void |
addAll(EffectList list) |
void |
apply(StructuredGraph graph,
ArrayList<Node> obsoleteNodes,
boolean cfgKills) |
void |
backtrack(int checkpoint) |
int |
checkpoint() |
void |
clear() |
private void |
enlarge(int elements) |
private static String |
format(Object object) |
EffectList.Effect |
get(int index) |
private String |
getName(int i) |
void |
insertAll(EffectList list,
int position) |
boolean |
isEmpty() |
Iterator<EffectList.Effect> |
iterator() |
int |
size() |
String |
toString() |
private void |
toString(StringBuilder str,
int i) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
private static final EffectList.Effect[] EMPTY_ARRAY
private static final String[] EMPTY_STRING_ARRAY
private EffectList.Effect[] effects
private int size
public EffectList()
private void enlarge(int elements)
public void add(String name, EffectList.SimpleEffect effect)
public void add(String name, EffectList.Effect effect)
public void addAll(EffectList list)
public void insertAll(EffectList list, int position)
public int checkpoint()
public int size()
public void backtrack(int checkpoint)
public Iterator<EffectList.Effect> iterator()
iterator
in interface Iterable<EffectList.Effect>
public EffectList.Effect get(int index)
public void clear()
public boolean isEmpty()
public void apply(StructuredGraph graph, ArrayList<Node> obsoleteNodes, boolean cfgKills)
private void toString(StringBuilder str, int i)