@Override public Path subpath( int beginIndex, int endIndex ) { CheckArg.isNonNegative(beginIndex, "beginIndex"); CheckArg.isNonNegative(endIndex, "endIndex"); if (endIndex >= 1) { EMPTY_SEGMENT_LIST.get(endIndex); // throws IndexOutOfBoundsException } return this; }
@Override public void setMinimumBinarySizeInBytes( long minSizeInBytes ) { CheckArg.isNonNegative(minSizeInBytes, "minSizeInBytes"); minBinarySizeInBytes.set(minSizeInBytes); }
@Override public void skip( long skipNum ) { CheckArg.isNonNegative(skipNum, "skipNum"); if (skipNum == 0L) return; throw new NoSuchElementException(); }
@Override public void skip( long skipNum ) { CheckArg.isNonNegative(skipNum, "skipNum"); if (skipNum == 0L) return; throw new NoSuchElementException(); }
@Override public void setMinimumBinarySizeInBytes( long minSizeInBytes ) { CheckArg.isNonNegative(minSizeInBytes, "minSizeInBytes"); minBinarySizeInBytes.set(minSizeInBytes); }
@Override public Path subpath( int beginIndex ) { CheckArg.isNonNegative(beginIndex, "beginIndex"); if (beginIndex == 0) return this; EMPTY_SEGMENT_LIST.get(1); // throws IndexOutOfBoundsException return null; }
/** * {@inheritDoc} * * @see org.modeshape.graph.property.Path#subpath(int) */ @Override public Path subpath( int beginIndex ) { CheckArg.isNonNegative(beginIndex, "beginIndex"); if (beginIndex == 0) return this; throw new IndexOutOfBoundsException(); }
/** * {@inheritDoc} * * @see org.modeshape.graph.property.Path#getSegment(int) */ @Override public Segment getSegment( int index ) { CheckArg.isNonNegative(index, "index"); EMPTY_SEGMENT_LIST.get(index); // throws IndexOutOfBoundsException return null; }
@Override public void skip( long skipNum ) { CheckArg.isNonNegative(skipNum, "skipNum"); if (skipNum == 0L) return; throw new NoSuchElementException(); }
@Override public Segment getSegment( int index ) { CheckArg.isNonNegative(index, "index"); EMPTY_SEGMENT_LIST.get(index); // throws IndexOutOfBoundsException return null; }
/** * @param pingTimeout the time to wait for a ping to complete * @param unit the time unit of the time argument */ public void setPingTimeout( long pingTimeout, TimeUnit unit ) { CheckArg.isNonNegative(pingTimeout, "time"); this.pingTimeout.set(unit.toNanos(pingTimeout)); }
/** * {@inheritDoc} * * @see org.modeshape.graph.property.Path#getAncestor(int) */ public Path getAncestor( int degree ) { CheckArg.isNonNegative(degree, "degree"); if (degree == 0) return this; if (degree == 1) return parent; return parent.getAncestor(degree - 1); }
@Override public void skip( long count ) { CheckArg.isNonNegative(count, "count"); while (--count >= 0) { nextNode(); } } }
/** * Create a new statistics object that has the supplied result formulation time. * * @param resultFormulationNanos the number of nanoseconds required by result formulation * @return the new statistics object; never null * @throws IllegalArgumentException if the time value is negative */ public Statistics withResultsFormulationTime( long resultFormulationNanos ) { CheckArg.isNonNegative(resultFormulationNanos, "resultFormulationNanos"); return new Statistics(planningNanos, optimizationNanos, resultFormulationNanos, executionNanos); }
@Override public Path getAncestor( int degree ) { CheckArg.isNonNegative(degree, "degree"); if (degree == 0) return this; if (degree == 1) return parent; return parent.getAncestor(degree - 1); }
@Override public void skip( long count ) { CheckArg.isNonNegative(count, "count"); while (--count >= 0) { nextProperty(); } } }
/** * Create a new statistics object that has the supplied execution time. * * @param executionNanos the number of nanoseconds required to execute the query * @return the new statistics object; never null * @throws IllegalArgumentException if the time value is negative */ public Statistics withExecutionTime( long executionNanos ) { CheckArg.isNonNegative(executionNanos, "executionNanos"); return new Statistics(planningNanos, optimizationNanos, resultFormulationNanos, executionNanos); }
@Override public void skip( long count ) { CheckArg.isNonNegative(count, "count"); while (--count >= 0) { nextProperty(); } } }
/** * Create a new statistics object that has the supplied planning time. * * @param planningNanos the number of nanoseconds required by planning * @return the new statistics object; never null * @throws IllegalArgumentException if the time value is negative */ public Statistics withPlanningTime( long planningNanos ) { CheckArg.isNonNegative(planningNanos, "planningNanos"); return new Statistics(planningNanos, optimizationNanos, resultFormulationNanos, executionNanos); }
@Override public void skip( long skipNum ) { CheckArg.isNonNegative(skipNum, "skipNum"); if (skipNum == 0L) return; for (long i = 0; i != skipNum; i++) { if (!hasNext()) return; next(); } }