Methods Summary |
---|
protected abstract void | colClear()
|
protected abstract java.lang.Object | colGetEntry(int index, int offset)
|
protected abstract java.util.Map | colGetMap()
|
protected abstract int | colGetSize()
|
protected abstract int | colIndexOfKey(java.lang.Object key)
|
protected abstract int | colIndexOfValue(java.lang.Object key)
|
protected abstract void | colPut(K key, V value)
|
protected abstract void | colRemoveAt(int index)
|
protected abstract V | colSetValue(int index, V value)
|
public static boolean | containsAllHelper(java.util.Map map, java.util.Collection collection)
Iterator<?> it = collection.iterator();
while (it.hasNext()) {
if (!map.containsKey(it.next())) {
return false;
}
}
return true;
|
public static boolean | equalsSetHelper(java.util.Set set, java.lang.Object object)
if (set == object) {
return true;
}
if (object instanceof Set) {
Set<?> s = (Set<?>) object;
try {
return set.size() == s.size() && set.containsAll(s);
} catch (NullPointerException ignored) {
return false;
} catch (ClassCastException ignored) {
return false;
}
}
return false;
|
public java.util.Set | getEntrySet()
if (mEntrySet == null) {
mEntrySet = new EntrySet();
}
return mEntrySet;
|
public java.util.Set | getKeySet()
if (mKeySet == null) {
mKeySet = new KeySet();
}
return mKeySet;
|
public java.util.Collection | getValues()
if (mValues == null) {
mValues = new ValuesCollection();
}
return mValues;
|
public static boolean | removeAllHelper(java.util.Map map, java.util.Collection collection)
int oldSize = map.size();
Iterator<?> it = collection.iterator();
while (it.hasNext()) {
map.remove(it.next());
}
return oldSize != map.size();
|
public static boolean | retainAllHelper(java.util.Map map, java.util.Collection collection)
int oldSize = map.size();
Iterator<K> it = map.keySet().iterator();
while (it.hasNext()) {
if (!collection.contains(it.next())) {
it.remove();
}
}
return oldSize != map.size();
|
public java.lang.Object[] | toArrayHelper(int offset)
final int N = colGetSize();
Object[] result = new Object[N];
for (int i=0; i<N; i++) {
result[i] = colGetEntry(i, offset);
}
return result;
|
public T[] | toArrayHelper(T[] array, int offset)
final int N = colGetSize();
if (array.length < N) {
@SuppressWarnings("unchecked") T[] newArray
= (T[]) Array.newInstance(array.getClass().getComponentType(), N);
array = newArray;
}
for (int i=0; i<N; i++) {
array[i] = (T)colGetEntry(i, offset);
}
if (array.length > N) {
array[N] = null;
}
return array;
|