Package 

Class Utils

  • All Implemented Interfaces:

    
    public final class Utils
    
                        
    • Constructor Detail

    • Method Detail

      • canSee

         final static <T extends Any> Boolean canSee(T a)

        Line-of-sight detector.

        Parameters:
        a - value
      • equal

         final static <T extends Any> Boolean equal(T a, T b)
        Parameters:
        a - first field
        b - second field
      • greaterThan

         final static <T extends Any> Boolean greaterThan(T a, T b)
        Parameters:
        a - first field
        b - second field
      • greaterEqual

         final static <T extends Any> Boolean greaterEqual(T a, T b)
        Parameters:
        a - first field
        b - second field
      • hoodW

         final static <T extends Any> T hoodW(T local, Function2<T, T, T> aggregator, T default, Function1<Unit, T> fieldBuilder)

        -hood wrapper.

        Parameters:
        local - local value
        aggregator - how to reduce information
        default - default value in case the field returned by fieldBuilder is empty
        fieldBuilder - return which field should be reduced
      • hoodWstateful

         final static <T extends Any> T hoodWstateful(T local, Function2<T, T, T> aggregator, T default, Function1<T, T> fieldBuilder)

        Stateful-hood wrapper.

        Parameters:
        local - local value
        aggregator - how to reduce information
        default - default value in case the field returned by fieldBuilder is empty
        fieldBuilder - return which field should be reduced
      • identity

         final static <T extends Any> T identity(T a)
        Parameters:
        a - value to be returned
      • isEdge

         final static Boolean isEdge(Boolean condition)

        Verify if a device is on the edge of a spatial region.

        Parameters:
        condition - how to discriminate a region
      • lessThan

         final static <T extends Any> Boolean lessThan(T a, T b)
        Parameters:
        a - first field
        b - second field
      • lessEqual

         final static <T extends Any> Boolean lessEqual(T a, T b)
        Parameters:
        a - first field
        b - second field
      • max

         final static <T extends Any> T max(T a, T b)
        Parameters:
        a - first field
        b - second field
      • norm

         final static Number ,Number)>norm(<ERROR CLASS> tuple, Number p)

        Norm of a numeric tuple.

        Parameters:
        tuple - tuple
        p - pow
      • notEqual

         final static <T extends Any> Boolean notEqual(T a, T b)
        Parameters:
        a - first field
        b - second field
      • union

         final static <T extends Any> <ERROR CLASS> ,)>union(<ERROR CLASS> a, <ERROR CLASS> b)
        Parameters:
        a - tuple
        b - tuple