Class ChildContexts

java.lang.Object
edu.tufts.hrilab.action.execution.ChildContexts

public class ChildContexts extends Object
  • Constructor Details

    • ChildContexts

      public ChildContexts()
  • Method Details

    • getCopy

      public ChildContexts getCopy()
      Get shallow copy. Underlying Contexts are not shared in copy.
      Returns:
    • add

      public void add(Context context)
    • setChildren

      public void setChildren(ChildContexts childContexts)
    • remove

      public boolean remove(Context context)
    • getNextIndex

      public int getNextIndex()
    • setNextIndex

      public void setNextIndex(int index)
    • get

      public Context get(int index)
    • getCurrent

      public Context getCurrent()
    • getPrevious

      public Context getPrevious()
    • getNext

      public Context getNext()
    • getNextAndIncrement

      public Context getNextAndIncrement()
    • size

      public int size()
    • isEmpty

      public boolean isEmpty()
    • getChildrenContexts

      public List<Context> 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

      public void forEach(Consumer<? super Context> consumer)
    • allMatch

      public boolean allMatch(Predicate<? super Context> predicate)
    • anyMatch

      public boolean anyMatch(Predicate<? super Context> predicate)
    • findFirst

      public Optional<Context> findFirst(Predicate<? super Context> predicate)
    • removeIf

      public boolean removeIf(Predicate<? super Context> predicate)
      Remove matching children. Note that this does not change the nextIndex counter.
      Parameters:
      predicate -
      Returns:
    • insert

      public void insert(Context newContext)
    • insert

      public void insert(Context newContext, int location)
    • findFirstIndexOf

      public int findFirstIndexOf(Predicate<? super Context> predicate)
    • indexOf

      public int indexOf(Context context)