net.sf.saxon.om
Interface GroundedValue<T extends Item>

All Superinterfaces:
ValueRepresentation<T>
All Known Implementing Classes:
AnyURIValue, AtomicValue, Base64BinaryValue, BigIntegerValue, BooleanValue, CalendarValue, DateTimeValue, DateValue, DayTimeDurationValue, DecimalValue, DoubleValue, DurationValue, EmptySequence, FloatValue, GDateValue, GDayValue, GMonthDayValue, GMonthValue, GYearMonthValue, GYearValue, HexBinaryValue, ImmutableMap, Int64Value, IntegerRange, IntegerValue, NotationValue, NumericValue, ObjectValue, QNameValue, QualifiedNameValue, SequenceExtent, SingletonItem, SingletonMap, StringValue, TimeValue, Tuple, UntypedAtomicValue, YearMonthDurationValue

public interface GroundedValue<T extends Item>
extends ValueRepresentation<T>

A value that exists in memory and that can be directly addressed


Field Summary
 
Fields inherited from interface net.sf.saxon.om.ValueRepresentation
EMPTY_VALUE_ARRAY
 
Method Summary
 int getLength()
          Get the size of the value (the number of items)
 T itemAt(int n)
          Get the n'th item in the value, counting from 0
 GroundedValue<T> subsequence(int start, int length)
          Get a subsequence of the value
 
Methods inherited from interface net.sf.saxon.om.ValueRepresentation
getStringValue, getStringValueCS
 

Method Detail

itemAt

T itemAt(int n)
Get the n'th item in the value, counting from 0

Parameters:
n - the index of the required item, with 0 representing the first item in the sequence
Returns:
the n'th item if it exists, or null otherwise

subsequence

GroundedValue<T> subsequence(int start,
                             int length)
Get a subsequence of the value

Parameters:
start - the index of the first item to be included in the result, counting from zero. A negative value is taken as zero. If the value is beyond the end of the sequence, an empty sequence is returned
length - the number of items to be included in the result. Specify Integer.MAX_VALUE to get the subsequence up to the end of the base sequence. If the value is negative, an empty sequence is returned. If the value goes off the end of the sequence, the result returns items up to the end of the sequence
Returns:
the required subsequence. If min is

getLength

int getLength()
Get the size of the value (the number of items)

Returns:
the number of items in the sequence


Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.