current = component.get(i); readComposite.addComponent(current.getValue(), current.getSerializer(), current.getComparator()); readComposite.addComponent(current.getValue(), current.getSerializer(), current.getComparator());
/** * Increase the last comparator to GT_E to ensure we get the next page * * @param composite * @return */ @SuppressWarnings({ "rawtypes", "unchecked" }) private DynamicComposite bumpComposite(DynamicComposite composite) { DynamicComposite newComposite = new DynamicComposite(); int size = composite.getComponents().size(); Component component = null; for (int i = 0; i < size - 1; i++) { component = composite.getComponent(i); newComposite.addComponent(component.getValue(), component.getSerializer(), component.getComparator(), component.getEquality()); } component = composite.getComponent(size - 1); newComposite.addComponent(component.getValue(), component.getSerializer(), component.getComparator(), ComponentEquality.GREATER_THAN_EQUAL); return newComposite; }
for (; i < startComponents.size() - 1; i++) { current = start.getComponent(i); end.setComponent(i, current.getValue(), current.getSerializer(), current.getComparator(), ComponentEquality.EQUAL); end.setComponent(i, current.getValue(), current.getSerializer(), current.getComparator(), ComponentEquality.GREATER_THAN_EQUAL);
for (; i < startComponents.size() - 1; i++) { current = start.getComponent(i); end.setComponent(i, current.getValue(), current.getSerializer(), current.getComparator(), ComponentEquality.EQUAL); end.setComponent(i, current.getValue(), current.getSerializer(), current.getComparator(), ComponentEquality.GREATER_THAN_EQUAL);
@SuppressWarnings("unchecked") public static DynamicComposite setEqualityFlag( DynamicComposite composite, ComponentEquality eq ) { if ( composite.isEmpty() ) { return composite; } int i = composite.size() - 1; @SuppressWarnings("rawtypes") Component c = composite.getComponent( i ); composite.setComponent( i, c.getValue(), c.getSerializer(), c.getComparator(), eq ); return composite; }