@ComponentSpecification public interface BasicUtil
BasicUtilImpl.getInstance(),
Arrays,
Array,
ReflectionUtil| Modifier and Type | Field and Description |
|---|---|
static int[] |
EMPTY_INT_ARRAY
An empty int array.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
compare(CharIterator charIterator1,
CharIterator charIterator2)
This method compares the given
CharIterator instances char by char. |
int |
findInArray(Object value,
Object[] array,
boolean checkEqual)
This method returns the index of the first element in the given
array that equals (see
checkEqual) to the given value. |
int |
findInArray(Object value,
Object array,
boolean checkEqual)
This method returns the index of the first element in the given
array that equals (see
checkEqual) to the given value. |
boolean |
isDeepEqual(Object o1,
Object o2)
This method checks if two given objects are
equal to each other. |
boolean |
isEqual(Object[] array1,
Object[] array2)
This method checks if two given arrays are structurally
equal to each
other. |
boolean |
isEqual(Object o1,
Object o2)
This method checks if two given objects are
equal to each other. |
boolean |
isInArray(Object value,
Object[] array,
boolean checkEqual)
This method determines if the given
array contains an element that equals (see checkEqual
) to the given value. |
boolean |
isInArray(Object value,
Object array,
boolean checkEqual)
This method determines if the given
array contains an element that equals (see checkEqual
) to the given value. |
boolean isEqual(Object o1, Object o2)
equal to each other. In advance
to Object.equals(Object) the objects may be null.o1 - the first object to compare. It may be null.o2 - the second object to compare. It may be null.true if both objects are null or the first is NOT null and
o1.equals(o2), false otherwise.isDeepEqual(Object, Object)boolean isEqual(Object[] array1, Object[] array2)
equal to each
other. On arrays the equals-method only checks for identity. This method
checks that both arrays have the same length and if so that the objects contained in the arrays
are equal. Additionally the given arrays may be null .array1 - the first array to compare. It may be null.array2 - the second array to compare. It may be null.true if both arrays are null or the first is NOT null and both arrays
have the same length and equal content, false
otherwise.boolean isDeepEqual(Object o1, Object o2)
equal to each other. In advance
to Object.equals(Object) the objects may be null and arrays are
compared structural recursively.o1 - the first object to compare. It may be null.o2 - the second object to compare. It may be null.true if both objects are null or the first is NOT null and
o1.equals(o2), false otherwise.int findInArray(Object value, Object[] array, boolean checkEqual)
array that equals (see
checkEqual) to the given value.value - is the value to check. It may be null.array - is the array to check.checkEqual - - if true the value only needs to be equal to an element, if false it needs to be the same (==).-1 if value is NOT contained in array.int findInArray(Object value, Object array, boolean checkEqual)
array that equals (see
checkEqual) to the given value. findInArray(Object, Object[], boolean) this method also works for
primitive arrays (such as int[]). In such case you need to supply the
according object-type
for value.value - is the value to check. It may be null.array - is the array to check.checkEqual - - if true the value only needs to be equal to an element, if false it needs to be the same (==).-1 if value is NOT contained in array.boolean isInArray(Object value, Object[] array, boolean checkEqual)
array contains an element that equals (see checkEqual
) to the given value.value - is the value to check. It may be null.array - is the array to check.checkEqual - - if true the value only needs to be equal to an element, if false it needs to be the same (==).true if the array contains value.findInArray(Object, Object[], boolean)boolean isInArray(Object value, Object array, boolean checkEqual)
array contains an element that equals (see checkEqual
) to the given value.value - is the value to check. It may be null.array - is the array to check.checkEqual - - if true the value only needs to be equal to an element, if false it needs to be the same (==).true if the array contains value.findInArray(Object, Object, boolean)boolean compare(CharIterator charIterator1, CharIterator charIterator2)
CharIterator instances char by char.charIterator1 - is the first CharIterator.charIterator2 - is the second CharIterator.true if both CharIterators produced the same next
chars until both ended at the same time, false otherwise.Copyright © 2001–2016 mmm-Team. All rights reserved.