/** * Returns the column key for a given index. * * @param column the column index (zero-based) * @return the column key * * @throws IndexOutOfBoundsException if <code>column</code> is out of bounds */ public Comparable getColumnKey(int column) { return columnKeys.get(column); }
/** * {@inheritDoc} */ @Override public E getElementAt(int index) { source.getReadWriteLock().readLock().lock(); try { return source.get(index); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * Returns the row key for a given index. * * @param row the row index (zero-based) * @return the row key * * @throws IndexOutOfBoundsException if <code>row</code> is out of bounds */ public Comparable getRowKey(int row) { return rowKeys.get(row); }
/** * Returns the column key for a given index. * * @param column the column index (zero-based) * @return the column key * * @throws IndexOutOfBoundsException if <code>column</code> is out of bounds */ public Comparable getColumnKey(int column) { return columnKeys.get(column); }
/** * Returns the row key for the row of the data value to retrieve. */ public R getRowKey() { if (rowKey == null) rowKey = rowKeys.get(rowIndex); return rowKey; }
/** * Returns the column key for the column of the data value to retrieve. */ public C getColumnKey() { if (columnKey == null) columnKey = columnKeys.get(columnIndex); return columnKey; } }
/** {@inheritDoc} */ @Override public E get(int index) { if(frozen) { return frozenData.get(index); } else { return source.get(index); } }
/** * {@inheritDoc} */ @Override public E get(int index) { final S elem = source.get(index); return function.evaluate(elem); }
/** * {@inheritDoc} */ @Override public E get(int index) { return supplyInsideLock(() -> delegate.get(index)); }
/** * Get whether the specified index in the filtered list is checked. */ private boolean getChecked(int index) { return getChecked(source.get(getSourceIndex(index))); }
/** {@inheritDoc} */ @Override public E get(int index) { beforeReadOperation(); try { return delegate.get(index); } finally { afterReadOperation(); } }
/** * Get whether the specified index in the filtered list is checked. */ private boolean getChecked(int index) { return getChecked(source.get(getSourceIndex(index))); }
/** {@inheritDoc} */ @Override public E get(int index) { if(index < 0 || index >= size()) throw new IndexOutOfBoundsException("Cannot get at " + index + " on list of size " + size()); return (E) source.get(getSourceIndex(index)); }
/** {@inheritDoc} */ @Override public E get(int index) { Object type = insertedSeparators.get(index); if(type == SEPARATOR) return (E)separators.get(getSeparatorIndex(index)).get(); else if(type == SOURCE_ELEMENT) return source.get(getSourceIndex(index)); else throw new IllegalStateException(); }
/** * Rebuild the CompositeMatcher modelled by this editor. */ private Matcher<E> rebuildMatcher() { final Matcher[] matchers = new Matcher[matcherEditors.size()]; for (int i = 0, n = matcherEditors.size(); i < n; i++) { matchers[i] = matcherEditors.get(i).getMatcher(); } if(mode == AND) return Matchers.and(matchers); else if(mode == OR) return Matchers.or(matchers); else throw new IllegalStateException(); }
/** {@inheritDoc} */ @Override public E get(int index) { Object type = insertedSeparators.get(index); if(type == SEPARATOR) return (E)separators.get(getSeparatorIndex(index)).get(); else if(type == SOURCE_ELEMENT) return source.get(getSourceIndex(index)); else throw new IllegalStateException(); }
/** * Rebuild the CompositeMatcher modelled by this editor. */ private Matcher<E> rebuildMatcher() { final Matcher[] matchers = new Matcher[matcherEditors.size()]; for (int i = 0, n = matcherEditors.size(); i < n; i++) { matchers[i] = matcherEditors.get(i).getMatcher(); } if(mode == AND) return Matchers.and(matchers); else if(mode == OR) return Matchers.or(matchers); else throw new IllegalStateException(); }
private void addSelectEvent(BarcodeIterator i) { E value = source.get(i.getIndex()); int deselectedIndex = i.getColourIndex(DESELECTED); int selectedIndex = i.set(SELECTED); addSelectEvent(selectedIndex, deselectedIndex, value); } private void addSelectEvent(int selectIndex, int deselectIndex, E value) {
/** @inheritDoc */ public void listChanged(ListEvent<E> listChanges) { final E oldValue = getValue(); setValue(source.size() > index ? source.get(index) : defaultValue); final E newValue = getValue(); fireValueChange(oldValue, newValue); } }
/** {@inheritDoc} */ @Override public E get(int index) { getReadWriteLock().readLock().lock(); try { return source.get(index); } finally { getReadWriteLock().readLock().unlock(); } }