-
- All Implemented Interfaces:
public final class Utils
-
-
Method Summary
Modifier and Type Method Description final static Booleanand(Boolean a, Boolean b)final static <T extends Any> BooleancanSee(T a)Line-of-sight detector. final static Numberdenormalize(Number x, Number oldmin, Number oldmax, Number newmin, Number newmax)final static Numberdiff(Number a, Number b)final static <T extends Any> Booleanequal(T a, T b)final static <T extends Any> BooleangreaterThan(T a, T b)final static <T extends Any> BooleangreaterEqual(T a, T b)final static <T extends Any> ThoodW(T local, Function2<T, T, T> aggregator, T default, Function1<Unit, T> fieldBuilder)-hood wrapper. final static <T extends Any> ThoodWstateful(T local, Function2<T, T, T> aggregator, T default, Function1<T, T> fieldBuilder)Stateful-hood wrapper. final static <T extends Any> Tidentity(T a)final static BooleanisEdge(Boolean condition)Verify if a device is on the edge of a spatial region. final static <T extends Any> BooleanlessThan(T a, T b)final static <T extends Any> BooleanlessEqual(T a, T b)final static <T extends Any> Tmax(T a, T b)final static Numbermean(Object local, Object field)final static Numbermin(Number a, Number b)final static ObjectgetUID()final static Number,Number)>norm(<ERROR CLASS> tuple, Number p)Norm of a numeric tuple. final static Booleannot(Boolean a)final static <T extends Any> BooleannotEqual(T a, T b)final static Booleanor(Boolean a, Boolean b)final static Numberrange(Number x, Number min, Number max)final static Numbersum(Number a, Number b)final static <T extends Any> <ERROR CLASS>,)>union (<ERROR CLASS> a, <ERROR CLASS> b)final static Numberzero()-
-
Method Detail
-
and
final static Boolean and(Boolean a, Boolean b)
- Parameters:
a- first conditionb- second condition
-
canSee
final static <T extends Any> Boolean canSee(T a)
Line-of-sight detector.
- Parameters:
a- value
-
denormalize
final static Number denormalize(Number x, Number oldmin, Number oldmax, Number newmin, Number newmax)
- Parameters:
x- value to be denormalizedoldmin- oldminoldmax- oldmaxnewmin- newminnewmax- newmax
-
equal
final static <T extends Any> Boolean equal(T a, T b)
- Parameters:
a- first fieldb- second field
-
greaterThan
final static <T extends Any> Boolean greaterThan(T a, T b)
- Parameters:
a- first fieldb- second field
-
greaterEqual
final static <T extends Any> Boolean greaterEqual(T a, T b)
- Parameters:
a- first fieldb- 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 valueaggregator- how to reduce informationdefault- default value in case the field returned by fieldBuilder is emptyfieldBuilder- 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 valueaggregator- how to reduce informationdefault- default value in case the field returned by fieldBuilder is emptyfieldBuilder- return which field should be reduced
-
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 fieldb- second field
-
lessEqual
final static <T extends Any> Boolean lessEqual(T a, T b)
- Parameters:
a- first fieldb- second field
-
norm
final static Number ,Number)>norm(<ERROR CLASS> tuple, Number p)
Norm of a numeric tuple.
- Parameters:
tuple- tuplep- pow
-
notEqual
final static <T extends Any> Boolean notEqual(T a, T b)
- Parameters:
a- first fieldb- second field
-
or
final static Boolean or(Boolean a, Boolean b)
- Parameters:
a- first conditionb- second condition
-
range
final static Number range(Number x, Number min, Number max)
- Parameters:
x- valuemin- lower boundmax- upper bound
-
union
final static <T extends Any> <ERROR CLASS> ,
)>union (<ERROR CLASS> a, <ERROR CLASS> b)- Parameters:
a- tupleb- tuple
-
-
-
-