/** * Convenience method that removes <code>count</code> leading segments * * @param count */ public void removeLeadingSegments(final int count) { Args.withinRange(0, segments.size(), count, "count"); for (int i = 0; i < count; i++) { segments.remove(0); } }
/** * Convenience method that removes <code>count</code> leading segments * * @param count */ public void removeLeadingSegments(final int count) { Args.withinRange(0, segments.size(), count, "count"); for (int i = 0; i < count; i++) { segments.remove(0); } }
/** * Checks the given value if it is between 0 to 100 quietly. If not a default value from 50 will * be set. * * @param name * the name * @param value * the value * @return the integer */ private static Integer checkQuietly(final String name, final Integer value) { Integer val = 50; try { val = Args.withinRange(0, 100, value, name); } catch (final IllegalArgumentException e) { LOGGER.error(String.format( "Given argument '%s' must have a value within [%s,%s], but was %s. Default value 50% will be set.", name, 0, 100, value)); } return val; }
Args.withinRange(0, fragment.size() - 1, streamOffset, "streamOffset");
Args.withinRange(0, fragment.size() - 1, streamOffset, "streamOffset");