/** {@inheritDoc} */ @Override public int getStartIndex() { return sortedSource.sortIndex(new Integer(lowerThreshold)); }
/** {@inheritDoc} */ @Override public int getStartIndex() { return sortedSource.sortIndex(new Integer(lowerThreshold)); }
/** {@inheritDoc} */ @Override public int getStartIndex() { return sortedSource.sortIndex(new Integer(lowerThreshold)); }
/** * Return the index of the group to which the <code>groupElement</code> * would belong if it were hypothetically added to the source list. Note * that <code>groupElement</code> does <strong>NOT</strong> have to exist * in a group. This method is essentially a convenient way to locate a * group based on a prototypical element of that group. * * @param groupElement a prototype element of the group to locate * @return the index of the group that would contain <code>groupElement</code> * if it were added to the source list or <code>-1</code> if no * currently existing group would contain the <code>groupElement</code> */ public int indexOfGroup(E groupElement) { // determine where the groupElement would be positioned in the source List final int sourceIndex = ((SortedList<E>) source).sortIndex(groupElement); // if the groupElement is not a member of the group, return -1 if (sourceIndex == source.size() || grouper.getComparator().compare(source.get(sourceIndex), groupElement) != 0) return -1; // return the index of the group that includes the element at the source index return grouper.getBarcode().getColourIndex(sourceIndex, Grouper.UNIQUE); }
/** * Return the index of the group to which the <code>groupElement</code> * would belong if it were hypothetically added to the source list. Note * that <code>groupElement</code> does <strong>NOT</strong> have to exist * in a group. This method is essentially a convenient way to locate a * group based on a prototypical element of that group. * * @param groupElement a prototype element of the group to locate * @return the index of the group that would contain <code>groupElement</code> * if it were added to the source list or <code>-1</code> if no * currently existing group would contain the <code>groupElement</code> */ public int indexOfGroup(E groupElement) { // determine where the groupElement would be positioned in the source List final int sourceIndex = ((SortedList<E>) source).sortIndex(groupElement); // if the groupElement is not a member of the group, return -1 if (sourceIndex == source.size() || grouper.getComparator().compare(source.get(sourceIndex), groupElement) != 0) return -1; // return the index of the group that includes the element at the source index return grouper.getBarcode().getColourIndex(sourceIndex, Grouper.UNIQUE); }
/** * Return the index of the group to which the <code>groupElement</code> * would belong if it were hypothetically added to the source list. Note * that <code>groupElement</code> does <strong>NOT</strong> have to exist * in a group. This method is essentially a convenient way to locate a * group based on a prototypical element of that group. * * @param groupElement a prototype element of the group to locate * @return the index of the group that would contain <code>groupElement</code> * if it were added to the source list or <code>-1</code> if no * currently existing group would contain the <code>groupElement</code> */ public int indexOfGroup(E groupElement) { // determine where the groupElement would be positioned in the source List final int sourceIndex = ((SortedList<E>) source).sortIndex(groupElement); // if the groupElement is not a member of the group, return -1 if (sourceIndex == source.size() || grouper.getComparator().compare(source.get(sourceIndex), groupElement) != 0) return -1; // return the index of the group that includes the element at the source index return grouper.getBarcode().getColourIndex(sourceIndex, Grouper.UNIQUE); }