Class MutableCommandSequence

  • All Implemented Interfaces:
    CommandSequence, java.lang.Iterable<Command<?>>

    public class MutableCommandSequence
    extends java.lang.Object
    implements CommandSequence
    Mutable implementation of CommandSequence. It is possible to add commands to this sequence.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<Command<?>> commands  
    • Constructor Summary

      Constructors 
      Constructor Description
      MutableCommandSequence()
      Initializes a new CommandSequence object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(Command<?> command)  
      java.util.Iterator<Command<?>> iterator()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • commands

        private final java.util.List<Command<?>> commands
    • Constructor Detail

      • MutableCommandSequence

        public MutableCommandSequence()
        Initializes a new CommandSequence object.
    • Method Detail

      • add

        public void add​(Command<?> command)
      • iterator

        public java.util.Iterator<Command<?>> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<Command<?>>