Package net.sourceforge.uiq3
Class Utils
- java.lang.Object
-
- net.sourceforge.uiq3.Utils
-
public final class Utils extends Object
Utility functions - so much for a pure OO language.- Since:
- 3.0.7
- Author:
- "Martin Krischik" «krischik@users.sourceforge.net»
-
-
Field Summary
Fields Modifier and Type Field Description private static LoggerLoggerClass logger instance.static longMinutes_3Three minutes in nanosecondsstatic longMinutes_6Six minutes in nanosecondsstatic longSeconds_1One seconds in nanosecondsprivate static StringTAGClass logger tag.
-
Constructor Summary
Constructors Modifier Constructor Description privateUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intabs(int Left)static short @NotNull []concat(short @NotNull [] Array, short Element)Concatenate an element to an arrays - is Java primitive!static short @NotNull []concat(short @NotNull [] Array_1, short @NotNull [] Array_2)Concatenate 2 arrays - is Java primitive!static voidcopy(short @NotNull [] Destination, int @NotNull [] Source)Copy an int array to and short array.static voidcopy(short @NotNull [] Destination, short @NotNull [] Source)Copy an int array to and short array.static booleanequals(boolean @NotNull [] Left, boolean @NotNull [] Right)compare the content of two arrays.static booleanequals(short @NotNull [] Left, short @NotNull [] Right)compare the content of two arrays.static intmax(int Left, int Right)static intmax(int Left, int Middle, int Right)static intmax(int Value_1, int Value_2, int Value_3, int Value_4, int Value_5)static intmin(int Left, int Right)static @Nullable StringRead_Line(InputStreamReader Reader)Read line from file
-
-
-
Field Detail
-
Logger
private static final Logger Logger
Class logger instance.
-
TAG
private static final String TAG
Class logger tag.
-
Minutes_3
public static final long Minutes_3
Three minutes in nanoseconds
- See Also:
- Constant Field Values
-
Minutes_6
public static final long Minutes_6
Six minutes in nanoseconds
- See Also:
- Constant Field Values
-
Seconds_1
public static final long Seconds_1
One seconds in nanoseconds
- See Also:
- Constant Field Values
-
-
Method Detail
-
Read_Line
@Nullable public static @Nullable String Read_Line(@NotNull InputStreamReader Reader) throws IOException
Read line from file- Parameters:
Reader- File to read from- Returns:
- Line read
- Throws:
IOException- can't read line- Since:
- uiq 3.0.7
-
abs
public static int abs(int Left)
- Parameters:
Left- Left value- Returns:
- Left or right - whichever is larger
- Since:
- uiq 3.0.7
-
concat
public static short @NotNull [] concat(short @NotNull [] Array, short Element)Concatenate an element to an arrays - is Java primitive! Ada - of course - can do this out of the box- Parameters:
Array- Array to append toElement- element to append- Returns:
- Array_1 & Element
-
concat
public static short @NotNull [] concat(short @NotNull [] Array_1, short @NotNull [] Array_2)Concatenate 2 arrays - is Java primitive! Ada - of course - can do this out of the box- Parameters:
Array_1- Array to append toArray_2- Array to append- Returns:
- Array_1 & Array_2
- Since:
- uiq 3.0.7
-
copy
public static void copy(short @NotNull [] Destination, int @NotNull [] Source)Copy an int array to and short array.- Parameters:
Destination- short array to copy toSource- int array to copy from
-
copy
public static void copy(short @NotNull [] Destination, short @NotNull [] Source)Copy an int array to and short array.- Parameters:
Destination- short array to copy toSource- int array to copy from
-
equals
public static boolean equals(boolean @NotNull [] Left, boolean @NotNull [] Right)compare the content of two arrays.- Parameters:
Left- Left arrayRight- right array- Returns:
- true if both arrays contain the same data
- Since:
- uiq 3.0.7
-
equals
public static boolean equals(short @NotNull [] Left, short @NotNull [] Right)compare the content of two arrays.- Parameters:
Left- Left arrayRight- right array- Returns:
- true if both arrays contain the same data
- Since:
- uiq 3.0.7
-
max
public static int max(int Left, int Right)- Parameters:
Left- Left valueRight- Right Value- Returns:
- Left or right - whichever is larger
- Since:
- uiq 3.0.7
-
max
public static int max(int Left, int Middle, int Right)- Parameters:
Left- Left valueMiddle- Middle ValueRight- Right Value- Returns:
- Left or right - whichever is larger
- Since:
- uiq 6.5.2
-
max
public static int max(int Value_1, int Value_2, int Value_3, int Value_4, int Value_5)- Parameters:
Value_1- Left valueValue_2- Middle ValueValue_3- Right Value- Returns:
- Left or right - whichever is larger
- Since:
- uiq 6.5.2
-
min
public static int min(int Left, int Right)- Parameters:
Left- Left valueRight- Right Value- Returns:
- Left or right - whichever is larger
- Since:
- uiq 3.0.7
-
-