@Override public int size() { return (int) array.getCount(); }
protected void checkIndex(int index) { int size = (int) array.getCount(); if (index < 0 || index >= size) { throw new IndexOutOfBoundsException("index = " + index + ", size = " + size); } }
@Override public void add(int index, U element) { checkNull(element); if (index < 0 || index > array.getCount()) { checkIndex(index); } ((NSMutableArray<U>) array).insertObject(element, index); }
public boolean containsValue(Object value) { if (!(value instanceof NSObject)) { return false; } NSArray<V> values = getAllValues(); int count = (int) values.getCount(); for (int i = 0; i < count; i++) { NSObject o = values.getObjectAt(i); if (o.equals(value)) { return true; } } return false; } public Set<Map.Entry<K, V>> entrySet() {
public boolean containsValue(Object value) { if (!(value instanceof NSObject)) { return false; } NSArray<V> values = getObjectEnumerator().getAllObjects(); int count = (int) values.getCount(); for (int i = 0; i < count; i++) { NSObject o = values.getObjectAt(i); if (o.equals(value)) { return true; } } return false; } public Set<Map.Entry<K, V>> entrySet() {
@Override public int size() { return (int) array.getCount(); }
@Override public int size() { return (int) array.getCount(); }
protected void checkIndex(int index) { int size = (int) array.getCount(); if (index < 0 || index >= size) { throw new IndexOutOfBoundsException("index = " + index + ", size = " + size); } }
protected void checkIndex(int index) { int size = (int) array.getCount(); if (index < 0 || index >= size) { throw new IndexOutOfBoundsException("index = " + index + ", size = " + size); } }
@Override public void add(int index, U element) { checkNull(element); if (index < 0 || index > array.getCount()) { checkIndex(index); } ((NSMutableArray<U>) array).insertObject(element, index); }
@Override public void add(int index, U element) { checkNull(element); if (index < 0 || index > array.getCount()) { checkIndex(index); } ((NSMutableArray<U>) array).insertObject(element, index); }
public boolean containsValue(Object value) { if (!(value instanceof NSObject)) { return false; } NSArray<V> values = getAllValues(); int count = (int) values.getCount(); for (int i = 0; i < count; i++) { NSObject o = values.getObjectAt(i); if (o.equals(value)) { return true; } } return false; } public Set<Map.Entry<K, V>> entrySet() {
public boolean containsValue(Object value) { if (!(value instanceof NSObject)) { return false; } NSArray<V> values = getAllValues(); int count = (int) values.getCount(); for (int i = 0; i < count; i++) { NSObject o = values.getObjectAt(i); if (o.equals(value)) { return true; } } return false; } public Set<Map.Entry<K, V>> entrySet() {
public boolean containsValue(Object value) { if (!(value instanceof NSObject)) { return false; } NSArray<V> values = getObjectEnumerator().getAllObjects(); int count = (int) values.getCount(); for (int i = 0; i < count; i++) { NSObject o = values.getObjectAt(i); if (o.equals(value)) { return true; } } return false; } public Set<Map.Entry<K, V>> entrySet() {
public boolean containsValue(Object value) { if (!(value instanceof NSObject)) { return false; } NSArray<V> values = getObjectEnumerator().getAllObjects(); int count = (int) values.getCount(); for (int i = 0; i < count; i++) { NSObject o = values.getObjectAt(i); if (o.equals(value)) { return true; } } return false; } public Set<Map.Entry<K, V>> entrySet() {