Class Effect
- java.lang.Object
-
- org.checkerframework.checker.guieffect.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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(@Nullable java.lang.Object o)
boolean
equals(Effect e)
Return true if this equals the given effect.java.lang.Class<? extends java.lang.annotation.Annotation>
getAnnot()
int
hashCode()
boolean
isPoly()
Return true if this is PolyUIEffect.boolean
isSafe()
Return true if this is SafeEffect.boolean
isUI()
Return true if this is UIEffect.static boolean
lessThanOrEqualTo(Effect left, Effect right)
Return true iffleft
is less than or equal toright
.static Effect
min(Effect l, Effect r)
java.lang.String
toString()
-
-
-
Method Detail
-
lessThanOrEqualTo
public static boolean lessThanOrEqualTo(Effect left, Effect right)
Return true iffleft
is less than or equal toright
.- Parameters:
left
- the first effect to compareright
- the first effect to compare- Returns:
- true iff
left
is less than or equal toright
-
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 classjava.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 classjava.lang.Object
-
hashCode
@Pure public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-