Package 

Interface EffectGroup

  • All Implemented Interfaces:
    it.unibo.alchemist.boundary.gui.effects.EffectFX , java.io.Serializable , java.lang.Iterable , java.util.Collection , java.util.Queue

    
    public interface EffectGroup<P extends Position2D<out P>>
     implements Serializable, Queue<EffectFX<P>>, EffectFX<P>
                        

    Models a group of effects. Each effect has a different priority of visualization.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract int search(EffectFX<P> effect) Checks if an effect is present in the group.
      abstract boolean getVisibilityOf(EffectFX<P> effect) Returns the visibility of the specified effect.
      abstract void setVisibilityOf(EffectFX<P> effect, boolean visibility) Sets the visibility of the specified effect.
      abstract void changePriority(EffectFX<P> effect, int offset) Changes the specified offset priority of the specified offset.
      abstract int hashCode()
      abstract boolean equals(Object obj) Compares the EffectGroups.
      • Methods inherited from class java.util.Queue

        add, element, offer, peek, poll, remove
      • Methods inherited from class java.util.Collection

        addAll, clear, contains, containsAll, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
      • Methods inherited from class java.lang.Iterable

        forEach, iterator, spliterator
      • Methods inherited from class it.unibo.alchemist.boundary.gui.effects.EffectFX

        computeDrawCommands, getName, isVisible, setName, setVisibility
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • search

         abstract int search(EffectFX<P> effect)

        Checks if an effect is present in the group.

        Parameters:
        effect - the effect to search
      • getVisibilityOf

         abstract boolean getVisibilityOf(EffectFX<P> effect)

        Returns the visibility of the specified effect.

        Parameters:
        effect - the effect
      • setVisibilityOf

         abstract void setVisibilityOf(EffectFX<P> effect, boolean visibility)

        Sets the visibility of the specified effect.

        Parameters:
        effect - the effect
        visibility - the visibility to set
      • changePriority

         abstract void changePriority(EffectFX<P> effect, int offset)

        Changes the specified offset priority of the specified offset.

        Parameters:
        effect - the effect
        offset - the offset; it can be positive or negative
      • equals

         abstract boolean equals(Object obj)

        Compares the EffectGroups. The result is true if and only if the argument is not null and every EffectFX contained is not null and equal to the corresponding in the comparing EffectGroup (order is important!) and the group has the same name, visibility and transparency.