Package oms3.util
Class Annotations
- java.lang.Object
-
- oms3.util.Annotations
-
public class Annotations extends Object
Annotation utilities.- Author:
- od
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleaninRange(Range range, double val)Check if a certain value is in rangestatic booleanisIn(Field f)Checks if a field is tagged as 'In'static booleanisInOut(Field f)Checks if a field is tagged as 'Out' and 'In'static booleanisOut(Field f)Checks if a field is tagged as 'Out'static booleanplays(Role role, String r)Checks if one role is played.static booleanplaysAll(Role role, String... r)Checks if all roles are played.
-
-
-
Method Detail
-
playsAll
public static boolean playsAll(Role role, String... r)
Checks if all roles are played.- Parameters:
role- the role to check.r- the roles that all have to be played- Returns:
- true or false.
-
plays
public static boolean plays(Role role, String r)
Checks if one role is played.- Parameters:
role- the role to checkr- the expected role- Returns:
- true or false.
-
isIn
public static boolean isIn(Field f)
Checks if a field is tagged as 'In'- Parameters:
f- the field to check- Returns:
- true is 'In', false otherwise.
-
isOut
public static boolean isOut(Field f)
Checks if a field is tagged as 'Out'- Parameters:
f- the field to check.- Returns:
- true if 'Out', false otherwise.
-
isInOut
public static boolean isInOut(Field f)
Checks if a field is tagged as 'Out' and 'In'- Parameters:
f- the field to check.- Returns:
- true if 'Out' and 'In', false otherwise.
-
inRange
public static boolean inRange(Range range, double val)
Check if a certain value is in range- Parameters:
range- range infoval- the value to check;- Returns:
- true if it is in range, false otherwise.
-
-