Package io.higson.runtime.rhino
Class RhinoUtil
java.lang.Object
io.higson.runtime.rhino.RhinoUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Object[]static Object[]static Object[]arrayList(int initialCapacity) static doublecalculateHaversineDistance(double latitude1, double longitude1, double latitude2, double longitude2) Calculate distance between two points not taking into account height difference.static doublecalculateHaversineDistance(double latitude1, double longitude1, double elevation1, double latitude2, double longitude2, double elevation2) Calculate distance between two points in latitude and longitude taking into account height difference.static Object[]collectionToArray(Collection<?> col) static booleanstatic booleanstatic BigDecimalstatic Class<?>static intstatic IntegergetInteger(Object o) static Stringstatic booleanstatic Stringstatic Stringstatic Stringstatic Stringstatic booleanstatic Integer[]integerArray(int size) static Integer[]integerArray(Integer... elements) integerList(Integer... elements) static booleanstatic booleanstatic booleanstatic intlinkedHashMap(Object... args) list()static Long[]longArray(int size) static Long[]static booleanmap()static Object[][]matrix(int rows, int cols) static Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic booleanstatic booleanstatic Objectstatic Object[]objectArray(int size) static Object[]objectArray(Object... elements) set()static Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic <T extends Comparable>
List<T>static <T> List<T>static <T> List<T>sort(List<T> list, Comparator<T> comparator) static <T> T[]sort(T[] array) static <T> T[]static <T> T[]sort(T[] array, Comparator<T> comparator) static <T> List<T>sortReversed(List<T> list) static <T> T[]sortReversed(T[] array) static String[]stringArray(int size) static String[]stringArray(String... elements) stringList(String... elements) static Stringstatic Stringstatic String
-
Field Details
-
INSTANCE
-
-
Method Details
-
calculateHaversineDistance
public static double calculateHaversineDistance(double latitude1, double longitude1, double latitude2, double longitude2) Calculate distance between two points not taking into account height difference.- Parameters:
latitude1- latitude of start point in degreeslongitude1- longitude of start point in degreeslatitude2- latitude of end point in degreeslongitude2- longitude of end point in degrees- Returns:
- Distance in Meters
-
calculateHaversineDistance
public static double calculateHaversineDistance(double latitude1, double longitude1, double elevation1, double latitude2, double longitude2, double elevation2) Calculate distance between two points in latitude and longitude taking into account height difference.- Parameters:
latitude1- latitude of start point in degreeslongitude1- longitude of start point in degreeselevation1- elevation of start point in meterslatitude2- latitude of end point in degreeslongitude2- longitude of end point in degreeselevation2- elevation of end point in meters- Returns:
- Distance in Meters
-
eq
-
gt
-
ge
-
lt
-
le
-
toLowerCase
-
toUpperCase
-
length
-
in
-
nvl
-
trim
-
list
-
list
-
integerList
-
stringList
-
arrayList
-
arrayList
-
arrayList
-
map
-
map
-
hashMap
-
treeMap
-
linkedHashMap
-
set
-
set
-
hashSet
-
treeSet
-
objectArray
-
objectArray
-
array
-
stringArray
-
stringArray
-
integerArray
-
integerArray
-
longArray
-
longArray
-
array
-
array
-
matrix
-
getClazz
- Throws:
ClassNotFoundException
-
collectionToArray
-
getInt
-
getInteger
-
getString
-
getBigDecimal
-
sort
-
sort
-
sortReversed
-
sort
public static <T> T[] sort(T[] array) -
sort
-
sortReversed
public static <T> T[] sortReversed(T[] array) -
sort
-
sort
-
hash
-
hash
-
hash
-
hash
-
sha1
-
sha1
-
sha1
-
sha1
-
sha1
-
sha256
-
sha256
-
sha256
-
sha256
-
sha256
-
md5
-
md5
-
md5
-
md5
-
md5
-
isEmpty
-
notEmpty
-
isBlank
-
notBlank
-