/** * Different from the typical get method; clears the non-null IntVLA, container, and fills it with any positions * associated with k in this MultiArrangement. If you want to append to container instead of clearing it, use * {@link #append(IntVLA, Object)}. * @param container a non-null IntVLA; will be modified! Even if no entries are added, will be cleared * @param k a K object or something that can be treated as one to search for * @return the number of items added to container; 0 if none were added */ public int get(final IntVLA container, final Object k) { container.clear(); return append(container, k); } /**
public int[] getArray(Collection<? extends K> keys) { if(keys == null) return new int[0]; int len = keys.size(), i = 0; IntVLA container = new IntVLA(len); for(K k : keys) { append(container, k); } return container.toArray(); }
public IntVLA getMany(Iterable<? extends K> keys) { if(keys == null) return new IntVLA(); IntVLA vals = new IntVLA(); for(K k : keys) { append(vals, k); } return vals; }
public int[] getArray(K[] keys) { if(keys == null) return new int[0]; int len = keys.length; IntVLA container = new IntVLA(len); for (int i = 0; i < len; i++) { append(container, keys[i]); } return container.toArray(); }