@Override public Object get(int index) { if (index < 0 || index >= masterList.size()) { throw new IndexOutOfBoundsException(); } // We should have an element, now check to see if we've already // mapped it to an observable value. if (index >= observableValueList.size()) { // Just null-padding entries that we should have, but haven't // been explicitly requested. while (this.observableValueList.size() <= index) { this.observableValueList.add(null); } } // I'm assuming get is Realm-bound, so there are no concurrency issues // to worry about. if (observableValueList.get(index) == null) { IObservableValue value = aggregateProperty.observe(masterList.get(index)); if (listener != null) { value.addValueChangeListener(listener); } observableValueList.set(index, value); } return observableValueList.get(index).getValue(); }
public Object getElementType() { return aggregateProperty.getValueType(); }