Class Effect


  • public final class Effect
    extends java.lang.Object
    An effect -- either UIEffect, PolyUIEffect, or SafeEffect.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Effect.EffectRange  
    • Constructor Summary

      Constructors 
      Constructor Description
      Effect​(java.lang.Class<? extends java.lang.annotation.Annotation> cls)
      Create a new Effect object.
    • Constructor Detail

      • Effect

        public Effect​(java.lang.Class<? extends java.lang.annotation.Annotation> cls)
        Create a new Effect object.
        Parameters:
        cls - one of UIEffect.class, PolyUIEffect.class, or SafeEffect.class
    • Method Detail

      • lessThanOrEqualTo

        public static boolean lessThanOrEqualTo​(Effect left,
                                                Effect right)
        Return true iff left is less than or equal to right.
        Parameters:
        left - the first effect to compare
        right - the first effect to compare
        Returns:
        true iff left is less than or equal to right
      • isSafe

        public boolean isSafe()
        Return true if this is SafeEffect.
        Returns:
        true if this is SafeEffect
      • isUI

        public boolean isUI()
        Return true if this is UIEffect.
        Returns:
        true if this is UIEffect
      • isPoly

        @Pure
        public boolean isPoly()
        Return true if this is PolyUIEffect.
        Returns:
        true if this is PolyUIEffect
      • getAnnot

        public java.lang.Class<? extends java.lang.annotation.Annotation> getAnnot()
      • toString

        @SideEffectFree
        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(Effect e)
        Return true if this equals the given effect.
        Parameters:
        e - the effect to compare this to
        Returns:
        true if this equals the given effect
      • equals

        public boolean equals​(@Nullable java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        @Pure
        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object