/** * Gets the maximum label (exclusive) of any block added to this instance. * * @return {@code >= 0;} the maximum label */ public final int getMaxLabel() { int sz = labelToIndex.size(); // Gobble any deleted labels that may be at the end. int i; for (i = sz - 1; (i >= 0) && (labelToIndex.get(i) < 0); i--) /*empty*/ ; int newSize = i + 1; labelToIndex.shrink(newSize); return newSize; }
/** * Gets the maximum label (exclusive) of any block added to this instance. * * @return {@code >= 0;} the maximum label */ public final int getMaxLabel() { int sz = labelToIndex.size(); // Gobble any deleted labels that may be at the end. int i; for (i = sz - 1; (i >= 0) && (labelToIndex.get(i) < 0); i--) /*empty*/ ; int newSize = i + 1; labelToIndex.shrink(newSize); return newSize; }
/** * Gets the maximum label (exclusive) of any block added to this instance. * * @return {@code >= 0;} the maximum label */ public final int getMaxLabel() { int sz = labelToIndex.size(); // Gobble any deleted labels that may be at the end. int i; for (i = sz - 1; (i >= 0) && (labelToIndex.get(i) < 0); i--) /*empty*/ ; int newSize = i + 1; labelToIndex.shrink(newSize); return newSize; }
/** * Gets the maximum label (exclusive) of any block added to this instance. * * @return {@code >= 0;} the maximum label */ public final int getMaxLabel() { int sz = labelToIndex.size(); // Gobble any deleted labels that may be at the end. int i; for (i = sz - 1; (i >= 0) && (labelToIndex.get(i) < 0); i--) /*empty*/ ; int newSize = i + 1; labelToIndex.shrink(newSize); return newSize; }
/** * Gets the maximum label (exclusive) of any block added to this instance. * * @return {@code >= 0;} the maximum label */ public final int getMaxLabel() { int sz = labelToIndex.size(); // Gobble any deleted labels that may be at the end. int i; for (i = sz - 1; (i >= 0) && (labelToIndex.get(i) < 0); i--) /*empty*/ ; int newSize = i + 1; labelToIndex.shrink(newSize); return newSize; }
/** * Gets the maximum label (exclusive) of any block added to this instance. * * @return {@code >= 0;} the maximum label */ public final int getMaxLabel() { int sz = labelToIndex.size(); // Gobble any deleted labels that may be at the end. int i; for (i = sz - 1; (i >= 0) && (labelToIndex.get(i) < 0); i--) /*empty*/ ; int newSize = i + 1; labelToIndex.shrink(newSize); return newSize; }
/** * Gets the maximum label (exclusive) of any block added to this instance. * * @return {@code >= 0;} the maximum label */ public final int getMaxLabel() { int sz = labelToIndex.size(); // Gobble any deleted labels that may be at the end. int i; for (i = sz - 1; (i >= 0) && (labelToIndex.get(i) < 0); i--) /*empty*/ ; int newSize = i + 1; labelToIndex.shrink(newSize); return newSize; }
/** * Gets the maximum label (exclusive) of any block added to this instance. * * @return {@code >= 0;} the maximum label */ public int getMaxLabel() { int sz = labelToIndex.size(); // Gobble any deleted labels that may be at the end... int i; for (i = sz - 1; (i >= 0) && (labelToIndex.get(i) < 0); i--) ; int newSize = i+1; labelToIndex.shrink(newSize); return newSize; }