List of utility methods to do Collection Element Get
Object | get(Collection coll, int index) get if (coll instanceof List) { return ((List) coll).get(index); } else { int i = 0; for (Iterator iter = coll.iterator(); iter.hasNext();) { Object object = (Object) iter.next(); if (i == index) { return object; ... |
Object | get(Collection p_collection, int p_index) Returns the element at the specified position in the collection. if (p_collection == null) { return null; Iterator it = p_collection.iterator(); for (int i = 0; it.hasNext(); i++) { if (i == p_index) { return it.next(); return null; |
Object | get(Collection> arr, int idx) get if (idx < 0) return null; for (Iterator<?> i = arr.iterator(); i.hasNext(); idx--) { Object b = i.next(); if (idx <= 0) return b; return null; ... |
E | get(Collection get return (E) collection.toArray()[index];
|
T | get(Collection This method provides a way to obtain an object from a collection, given an equal object (logical equals). if (p_oObj == null) return null; if (isEmpty(p_oCol)) return null; if (p_oCol instanceof List) return get(p_oCol, ((List<T>) p_oCol).indexOf(p_oObj)); T oObj = null; T oTempObj = null; ... |
T | get(Collection get Iterator<T> itr = v.iterator(); for (int k = 0; k < i; k++) itr.next(); return itr.next(); |
T | get(final Collection extends Object> list, final int pos) get int cnt = 0; for (final Object group : list) { if (cnt == pos) { return (T) group; cnt += 1; return null; ... |
T | get(final Collection get if (collection != null) { int i = 0; for (final T object : collection) { if (i == index) { return object; } else { i++; return null; |
Collection | getAddedItems(Collection Find out what elements are added between the oldValues and newValues if (newValues == null) { newValues = Collections.emptySet(); Collection<String> deltaInterest = new HashSet<String>(newValues); if (oldValues == null) { oldValues = Collections.emptySet(); deltaInterest.removeAll(oldValues); ... |
Collection | getAdditions(Collection get Additions List<T> addedElements = new ArrayList<T>(); for (T element : target) { if (!source.contains(element)) { addedElements.add(element); return addedElements; |