Class ChildContexts
java.lang.Object
edu.tufts.hrilab.action.execution.ChildContexts
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanvoidclear()intfindFirstIndexOf(Predicate<? super Context> predicate) voidget(int index) Get all children contexts in a copied List (shallow copy).getCopy()Get shallow copy.getNext()intintvoidvoidbooleanisEmpty()booleanbooleanRemove matching children.voidreset()voidresetRemaining(int index) voidsetChildren(ChildContexts childContexts) voidsetNextIndex(int index) intsize()
-
Constructor Details
-
ChildContexts
public ChildContexts()
-
-
Method Details
-
getCopy
Get shallow copy. Underlying Contexts are not shared in copy.- Returns:
-
add
-
setChildren
-
remove
-
getNextIndex
public int getNextIndex() -
setNextIndex
public void setNextIndex(int index) -
get
-
getCurrent
-
getPrevious
-
getNext
-
getNextAndIncrement
-
size
public int size() -
isEmpty
public boolean isEmpty() -
getChildrenContexts
Get all children contexts in a copied List (shallow copy).- Returns:
-
clear
public void clear() -
reset
public void reset() -
resetRemaining
public void resetRemaining(int index) -
forEach
-
allMatch
-
anyMatch
-
findFirst
-
removeIf
Remove matching children. Note that this does not change the nextIndex counter.- Parameters:
predicate-- Returns:
-
insert
-
insert
-
findFirstIndexOf
-
indexOf
-