Package oms3.util

Class Annotations


  • public class Annotations
    extends Object
    Annotation utilities.
    Author:
    od
    • 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 check
        r - 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 info
        val - the value to check;
        Returns:
        true if it is in range, false otherwise.