/** * Returns the stale state. Must be invoked from the current realm. * * @return stale state */ public boolean isStale() { getterCalled(); return stale; }
/** * @TrackedGetter */ public Object get(int index) { getterCalled(); return wrappedList.get(index); }
public String toString() { getterCalled(); return wrappedList.toString(); }
/** * @TrackedGetter */ public int indexOf(Object o) { getterCalled(); return wrappedList.indexOf(o); }
public int hashCode() { getterCalled(); return wrappedList.hashCode(); }
public Object[] toArray(Object[] a) { getterCalled(); return wrappedList.toArray(a); }
/** * @TrackedGetter */ public int lastIndexOf(Object o) { getterCalled(); return wrappedList.lastIndexOf(o); }
public boolean equals(Object o) { getterCalled(); return o == this || wrappedList.equals(o); }
public Iterator iterator() { getterCalled(); final Iterator wrappedIterator = wrappedList.iterator(); return new Iterator() { public void remove() { throw new UnsupportedOperationException(); } public boolean hasNext() { return wrappedIterator.hasNext(); } public Object next() { return wrappedIterator.next(); } }; }
public boolean contains(Object o) { getterCalled(); return wrappedList.contains(o); }
public boolean containsAll(Collection c) { getterCalled(); return wrappedList.containsAll(c); }
public boolean isEmpty() { getterCalled(); return wrappedList.isEmpty(); }
public int size() { getterCalled(); return wrappedList.size(); }
public Object[] toArray() { getterCalled(); return wrappedList.toArray(); }
getterCalled(); final ListIterator wrappedIterator = wrappedList.listIterator(index); return new ListIterator() {
public List subList(final int fromIndex, final int toIndex) { getterCalled(); if (fromIndex < 0 || fromIndex > toIndex || toIndex > size()) { throw new IndexOutOfBoundsException(); } return new AbstractObservableList(getRealm()) { public Object getElementType() { return ObservableList.this.getElementType(); } public Object get(int location) { return ObservableList.this.get(fromIndex + location); } protected int doGetSize() { return toIndex - fromIndex; } }; }