@Test public void createSliceFromParseValue() { final ParseValue value = setupValue(); assertTrue(value.slice().source.isAvailable(ZERO, BigInteger.valueOf(4))); assertFalse(value.slice().source.isAvailable(ZERO, BigInteger.valueOf(5))); }
@Override protected boolean isAvailable(final BigInteger offset, final BigInteger length) { return checkNotNegative(offset, "offset").add(checkNotNegative(length, "length")).compareTo(BigInteger.valueOf(getValue().length)) <= 0; }
DataExpressionSource extends Source { @Override protected boolean isAvailable(final BigInteger offset, final BigInteger length) { return checkNotNegative(offset, "offset").add(checkNotNegative(length, "length")).compareTo(BigInteger.valueOf(getValue().length)) <= 0; } }
DataExpressionSource extends Source { @Override protected boolean isAvailable(final BigInteger offset, final BigInteger length) { return checkNotNegative(offset, "offset").add(checkNotNegative(length, "length")).compareTo(BigInteger.valueOf(getValue().length)) <= 0; } DataExpressionSource(final ValueExpression dataExpression, final int index, final ParseState parseState, final Encoding encoding); }
DataExpressionSource extends Source { @Override protected boolean isAvailable(final BigInteger offset, final BigInteger length) { return checkNotNegative(offset, "offset").add(checkNotNegative(length, "length")).compareTo(BigInteger.valueOf(getValue().length)) <= 0; } DataExpressionSource(final ValueExpression dataExpression, final int index, final ParseState parseState, final Encoding encoding); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); }
DataExpressionSource extends Source { @Override protected boolean isAvailable(final BigInteger offset, final BigInteger length) { return checkNotNegative(offset, "offset").add(checkNotNegative(length, "length")).compareTo(BigInteger.valueOf(getValue().length)) <= 0; } DataExpressionSource(final ValueExpression dataExpression, final int index, final ParseState parseState, final Encoding encoding); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); final ValueExpression dataExpression; final int index; final ParseState parseState; final Encoding encoding; }