-
- 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.
-
-
Method Summary
Modifier and Type Method Description abstract intsearch(EffectFX<P> effect)Checks if an effect is present in the group. abstract booleangetVisibilityOf(EffectFX<P> effect)Returns the visibility of the specified effect. abstract voidsetVisibilityOf(EffectFX<P> effect, boolean visibility)Sets the visibility of the specified effect. abstract voidchangePriority(EffectFX<P> effect, int offset)Changes the specified offset priority of the specified offset. abstract inthashCode()abstract booleanequals(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
-
-
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 effectvisibility- 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 effectoffset- the offset; it can be positive or negative
-
hashCode
abstract int hashCode()
-
equals
abstract boolean equals(Object obj)
Compares the EffectGroups. The result is true if and only if the argument is not
nulland every EffectFX contained is notnulland equal to the corresponding in the comparingEffectGroup(order is important!) and the group has the same name, visibility and transparency.
-
-
-
-