@Deprecated public final class object extends StaticObject
Modifier and Type | Field and Description |
---|---|
static Function<Object,Boolean> |
NonNull
Deprecated.
A
null checking predicate which can be used to check an array
for null values. |
static Function<Verifiable,Boolean> |
Verify
Deprecated.
Verifies
Verifiable array elements. |
Modifier and Type | Method and Description |
---|---|
static double |
checkProbability(double p)
Deprecated.
Check if the given double value is within the closed range
[0, 1] . |
static <C extends Comparable<? super C>> |
CheckRange(C min,
C max)
Deprecated.
A range checking predicate which can be used to check whether the elements
of an array are within an given range.
|
static boolean |
eq(boolean[] a,
boolean[] b)
Deprecated.
Compares the two given
boolean arrays. |
static boolean |
eq(boolean a,
boolean b)
Deprecated.
Compares the two given
boolean values. |
static boolean |
eq(byte[] a,
byte[] b)
Deprecated.
Compares the two given
byte arrays. |
static boolean |
eq(byte a,
byte b)
Deprecated.
Compares the two given
byte values. |
static boolean |
eq(char[] a,
char[] b)
Deprecated.
Compares the two given
char arrays. |
static boolean |
eq(char a,
char b)
Deprecated.
Compares the two given
char values. |
static boolean |
eq(double[] a,
double[] b)
Deprecated.
Compares the two given
double arrays. |
static boolean |
eq(double a,
double b)
Deprecated.
Compares the two given
double values. |
static boolean |
eq(Enum<?> a,
Enum<?> b)
Deprecated.
Compares the two given
Enum values. |
static boolean |
eq(float[] a,
float[] b)
Deprecated.
Compares the two given
float arrays. |
static boolean |
eq(float a,
float b)
Deprecated.
Compares the two given
float values. |
static boolean |
eq(int[] a,
int[] b)
Deprecated.
Compares the two given
int arrays. |
static boolean |
eq(int a,
int b)
Deprecated.
Compares the two given
int values. |
static boolean |
eq(long[] a,
long[] b)
Deprecated.
Compares the two given
long arrays. |
static boolean |
eq(long a,
long b)
Deprecated.
Compares the two given
long values. |
static boolean |
eq(Measurable<Duration> a,
Measurable<Duration> b)
Deprecated.
|
static boolean |
eq(Object[] a,
Object[] b)
Deprecated.
Compares the two given
Object arrays. |
static boolean |
eq(Object a,
Object b)
Deprecated.
Compares the two given
Object values. |
static boolean |
eq(Seq<?> a,
Seq<?> b)
Deprecated.
Compares the two given
Seq values. |
static boolean |
eq(short[] a,
short[] b)
Deprecated.
Compares the two given
short arrays. |
static boolean |
eq(short a,
short b)
Deprecated.
Compares the two given
short values. |
static HashCodeBuilder |
hashCodeOf(Class<?> type)
Deprecated.
Will be (re)moved; internal use only.
|
static double |
nonNegative(double value)
Deprecated.
Check if the specified value is not negative.
|
static double |
nonNegative(double value,
String message)
Deprecated.
Check if the specified value is not negative.
|
static int |
nonNegative(int length)
Deprecated.
Check if the given integer is negative.
|
static Function<Object,Boolean> |
NonNull(String message)
Deprecated.
A
null checking predicate which can be used to check an array
for null values. |
static <T> T |
nonNull(T obj)
Deprecated.
Use
Objects.requireNonNull(Object) instead. |
static <T> T |
nonNull(T obj,
String message)
Deprecated.
Use
Objects.requireNonNull(Object, String)
instead. |
static String |
str(byte... data)
Deprecated.
Use
bit.toByteString(byte...) instead. |
static String |
str(Object a)
Deprecated.
Use
Objects.toString(Object) instead. |
public static final Function<Verifiable,Boolean> Verify
Verifiable
array elements. All elements are valid if the
condition
arrays.forAll(Verify) == true
public static final Function<Object,Boolean> NonNull
null
checking predicate which can be used to check an array
for null values. The following code will throw an
NullPointerException
if one of the array elements is null
.
final Array<String> array = ...
array.forEach(NonNull("Object"));
...
final String[] array = ...
arrays.forEach(array, NonNull);
public static final <C extends Comparable<? super C>> Function<C,Boolean> CheckRange(C min, C max)
IllegalArgumentException
is thrown. If one value is null
,
an NullPointerException
is thrown.
The following code will throw an IllegalArgumentException
if the
integers in the array are smaller than zero and greater than 9.
final Array<Integer> array = ...
arrays.forEach(CheckRange<(0, 10));
public static final Function<Object,Boolean> NonNull(String message)
null
checking predicate which can be used to check an array
for null values. The following code will throw an
NullPointerException
if one of the array elements is null
.
final Array<String> array = ...
array.forEach(NonNull("Object"));
...
final String[] array = ...
arrays.forEach(array, NonNull);
@Deprecated public static <T> T nonNull(T obj, String message)
Objects.requireNonNull(Object, String)
instead.null
.obj
- the object to check.message
- the error message.obj
if not null
.NullPointerException
- if obj
is null
.@Deprecated public static <T> T nonNull(T obj)
Objects.requireNonNull(Object)
instead.null
.obj
- the object to check.obj
if not null
.NullPointerException
- if obj
is null
.public static double nonNegative(double value, String message)
value
- the value to check.message
- the exception message.IllegalArgumentException
- if value < 0
.public static double nonNegative(double value)
value
- the value to check.IllegalArgumentException
- if value < 0
.public static int nonNegative(int length)
length
- the value to check.NegativeArraySizeException
- if the given length
is smaller
than zero.public static double checkProbability(double p)
[0, 1]
.p
- the probability to check.IllegalArgumentException
- if p
is not a valid probability.@Deprecated public static HashCodeBuilder hashCodeOf(Class<?> type)
type
- the type the HashCodeBuilder is created for.public static boolean eq(boolean a, boolean b)
boolean
values.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(boolean[] a, boolean[] b)
boolean
arrays.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(byte a, byte b)
byte
values.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(byte[] a, byte[] b)
byte
arrays.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(char a, char b)
char
values.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(char[] a, char[] b)
char
arrays.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(short a, short b)
short
values.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(short[] a, short[] b)
short
arrays.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(int a, int b)
int
values.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(int[] a, int[] b)
int
arrays.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(long a, long b)
long
values.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(long[] a, long[] b)
long
arrays.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(float a, float b)
float
values.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(float[] a, float[] b)
float
arrays.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(double a, double b)
double
values.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(double[] a, double[] b)
double
arrays.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(Enum<?> a, Enum<?> b)
Enum
values.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(Object a, Object b)
Object
values.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(Measurable<Duration> a, Measurable<Duration> b)
public static boolean eq(Object[] a, Object[] b)
Object
arrays.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.public static boolean eq(Seq<?> a, Seq<?> b)
Seq
values.a
- first value to compare.b
- second value to compare.true
if the given values are equal, false
otherwise.@Deprecated public static String str(Object a)
Objects.toString(Object)
instead.a
- the object.Objects.toString(Object)
@Deprecated public static String str(byte... data)
bit.toByteString(byte...)
instead.Byte: 3 2 1 0 | | | | Array: "11110011|10011101|01000000|00101010" | | | | Bit: 23 15 7 0Only the array string is printed.
data
- the byte array to convert to a string.© 2007-2014 Franz Wilhelmstötter (2014-03-07 19:35)