public class OCollections extends Object
Constructor and Description |
---|
OCollections() |
Modifier and Type | Method and Description |
---|---|
static int |
indexOf(int[] array,
int object)
This method is used to find a number in an array.
|
static <T> int |
indexOf(List<T> list,
T object,
Comparator<T> comparator)
This method is used to find item in collection using passed in comparator.
|
static int |
indexOf(Object[] array,
Comparable object)
This method is used to find an item in an array.
|
static String |
toString(Iterable<?> iterable)
Create a string representation of all objects in the given Iterable.
|
public static <T> int indexOf(List<T> list, T object, Comparator<T> comparator)
T
- Type of collection elements.list
- List in which value should be found.object
- Object to find.comparator
- Comparator is sued for search.-1
otherwise.public static int indexOf(Object[] array, Comparable object)
array
- Array in which value should be found.object
- Object to find.-1
otherwise.public static int indexOf(int[] array, int object)
array
- Array of integers in which value should be found.object
- number to find.-1
otherwise.Copyright © 2009–2020 OrientDB. All rights reserved.