private boolean hasSubselection(CellPath path) { while (current != null || iterator.hasNext()) { if (current == null) current = iterator.next(); int cmp = current.compareInclusionOf(path); if (cmp == 0) // The path is included return true; else if (cmp < 0) // The path is before this sub-selection, it's not included by any return false; // the path is after this sub-selection, we need to check the next one. current = null; } return false; } }
private boolean hasSubselection(CellPath path) { while (current != null || iterator.hasNext()) { if (current == null) current = iterator.next(); int cmp = current.compareInclusionOf(path); if (cmp == 0) // The path is included return true; else if (cmp < 0) // The path is before this sub-selection, it's not included by any return false; // the path is after this sub-selection, we need to check the next one. current = null; } return false; } }
private boolean hasSubselection(CellPath path) { while (current != null || iterator.hasNext()) { if (current == null) current = iterator.next(); int cmp = current.compareInclusionOf(path); if (cmp == 0) // The path is included return true; else if (cmp < 0) // The path is before this sub-selection, it's not included by any return false; // the path is after this sub-selection, we need to check the next one. current = null; } return false; } }
private boolean hasSubselection(CellPath path) { while (current != null || iterator.hasNext()) { if (current == null) current = iterator.next(); int cmp = current.compareInclusionOf(path); if (cmp == 0) // The path is included return true; else if (cmp < 0) // The path is before this sub-selection, it's not included by any return false; // the path is after this sub-selection, we need to check the next one. current = null; } return false; } }
/** * Whether the provided complex cell (identified by its column and path), which is assumed to be _fetched_ by * this filter, is also _queried_ by the user. * * !WARNING! please be sure to understand the difference between _fetched_ and _queried_ * columns that this class made before using this method. If unsure, you probably want * to use the {@link #fetches} method. */ public boolean fetchedCellIsQueried(ColumnDefinition column, CellPath path) { assert path != null; if (!isFetchAll || subSelections == null) return true; SortedSet<ColumnSubselection> s = subSelections.get(column.name); // No subsection for this column means everything is queried if (s.isEmpty()) return true; for (ColumnSubselection subSel : s) if (subSel.compareInclusionOf(path) == 0) return true; return false; }
/** * Whether the provided complex cell (identified by its column and path), which is assumed to be _fetched_ by * this filter, is also _queried_ by the user. * * !WARNING! please be sure to understand the difference between _fetched_ and _queried_ * columns that this class made before using this method. If unsure, you probably want * to use the {@link #fetches} method. */ public boolean fetchedCellIsQueried(ColumnDefinition column, CellPath path) { assert path != null; if (!isFetchAll || subSelections == null) return true; SortedSet<ColumnSubselection> s = subSelections.get(column.name); // No subsection for this column means everything is queried if (s.isEmpty()) return true; for (ColumnSubselection subSel : s) if (subSel.compareInclusionOf(path) == 0) return true; return false; }
/** * Whether the provided complex cell (identified by its column and path), which is assumed to be _fetched_ by * this filter, is also _queried_ by the user. * * !WARNING! please be sure to understand the difference between _fetched_ and _queried_ * columns that this class made before using this method. If unsure, you probably want * to use the {@link #fetches} method. */ public boolean fetchedCellIsQueried(ColumnDefinition column, CellPath path) { assert path != null; if (!isFetchAll || subSelections == null) return true; SortedSet<ColumnSubselection> s = subSelections.get(column.name); // No subsection for this column means everything is queried if (s.isEmpty()) return true; for (ColumnSubselection subSel : s) if (subSel.compareInclusionOf(path) == 0) return true; return false; }
/** * Whether the provided complex cell (identified by its column and path), which is assumed to be _fetched_ by * this filter, is also _queried_ by the user. * * !WARNING! please be sure to understand the difference between _fetched_ and _queried_ * columns that this class made before using this method. If unsure, you probably want * to use the {@link #fetches} method. */ public boolean fetchedCellIsQueried(ColumnDefinition column, CellPath path) { assert path != null; if (!isFetchAll || subSelections == null) return true; SortedSet<ColumnSubselection> s = subSelections.get(column.name); // No subsection for this column means everything is queried if (s.isEmpty()) return true; for (ColumnSubselection subSel : s) if (subSel.compareInclusionOf(path) == 0) return true; return false; }