|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.octet.util.ArrayKit
A collection of static utility methods for working with arrays.
| Method Summary | |
static boolean |
containsDuplicates(java.lang.Object[] array)
Returns true if array contains any duplicate elements, or false
otherwise. |
static int |
countMatches(java.lang.Object[] array,
java.lang.Object search)
Counts the number of occurrances of search in
array. |
static int |
countMatches(java.lang.Object[] array,
java.lang.Object[] search)
Returns the number of common Objects in array
and search. |
static int |
indexOf(java.lang.Object[] array,
java.lang.Object search)
Performs a linear search for search within array,
returning the index if found, or -1 otherwise. |
static boolean |
match(java.lang.Object[] array,
java.lang.Object search)
Returns true if search is contained within
array, or false otherwise. |
static boolean |
matchAll(java.lang.Object[] array,
java.lang.Object[] search)
Returns true the elements of array and
search are identical. |
static boolean |
matchInOrder(java.lang.Object[] array,
java.lang.Object[] search)
Returns true the elements and ordering of array and
search are identical. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static int countMatches(java.lang.Object[] array,
java.lang.Object[] search)
Objects in array
and search.
array - the arraysearch - the search
Objects in array
and search
public static int countMatches(java.lang.Object[] array,
java.lang.Object search)
search in
array.
array - the array to checksearch - the object to search for
search in
array
public static int indexOf(java.lang.Object[] array,
java.lang.Object search)
search within array,
returning the index if found, or -1 otherwise.
array - the array to searchsearch - the object to find
public static boolean match(java.lang.Object[] array,
java.lang.Object search)
true if search is contained within
array, or false otherwise.
array - the array to searchsearch - the object to find
true if found, false otherwise
public static boolean matchInOrder(java.lang.Object[] array,
java.lang.Object[] search)
true the elements and ordering of array and
search are identical.
array - the array to be searchedsearch - the array containing the elements to search for
true if both arrays contain the same elements in
the same relative ordering, or false otherwise
public static boolean matchAll(java.lang.Object[] array,
java.lang.Object[] search)
true the elements of array and
search are identical. The relative ordering may vary.
array - the array to be searchedsearch - the array containing the elements to search for
true if both arrays contain the same elements in
any relative ordering, or false otherwisepublic static boolean containsDuplicates(java.lang.Object[] array)
true if array contains any duplicate elements, or false
otherwise.
array - the array to be searched
true if array contains any duplicate elements, or false
otherwise
|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||