Package 

Class AbstractEffect

  • All Implemented Interfaces:
    it.unibo.alchemist.boundary.gui.effects.EffectFX , java.io.Serializable

    
    public abstract class AbstractEffect<P extends Position2D<out P>>
     implements EffectFX<P>
                        

    It models an abstract implementation of the effect interface, implementing default name and visibility properties.

    The effect behavior can be implemented via computeDrawCommands template method.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private String name
      private boolean visibility
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getName() Gets the name of the effect.
      final void setName(String name) Sets the name of the effect.
      final void setVisibility(boolean visibility) Sets the visibility of the effect.
      <T> Queue<DrawCommand<P>> computeDrawCommands(Environment<T, P> environment) Computes a queue of commands to Draw something.
      final boolean isVisible() Gets the visibility of the effect.
      abstract int hashCode()
      abstract boolean equals(Object obj)
      • Methods inherited from class it.unibo.alchemist.boundary.gui.effects.EffectFX

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

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

    • Method Detail

      • setName

         final void setName(String name)

        Sets the name of the effect.

        Parameters:
        name - the name of the effect to set
      • setVisibility

         final void setVisibility(boolean visibility)

        Sets the visibility of the effect.

        Parameters:
        visibility - the visibility of the effect to set
      • isVisible

         final boolean isVisible()

        Gets the visibility of the effect.