Package org.restlet.data
Class ReferenceList
List of URI references.
- Author:
- Jerome Louvel
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.ReferenceList(int initialCapacity) Constructor.ReferenceList(List<Reference> delegate) Constructor.ReferenceList(Representation uriList) Constructor from a "text/uri-list" representation. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCreates then adds a reference at the end of the list.Returns the list identifier.Returns a representation of the list in the "text/uri-list" format.Returns a representation of the list in "text/html" format.voidsetIdentifier(String identifier) Sets the list reference.voidsetIdentifier(Reference identifier) Sets the list reference.subList(int fromIndex, int toIndex) Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.Methods inherited from class org.restlet.util.WrapperList
add, add, addAll, addAll, clear, contains, containsAll, equals, get, getDelegate, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
replaceAll, sort, spliterator
-
Constructor Details
-
ReferenceList
public ReferenceList()Constructor. -
ReferenceList
public ReferenceList(int initialCapacity) Constructor.- Parameters:
initialCapacity- The initial list capacity.
-
ReferenceList
Constructor.- Parameters:
delegate- The delegate list.
-
ReferenceList
Constructor from a "text/uri-list" representation.- Parameters:
uriList- The "text/uri-list" representation to parse.- Throws:
IOException
-
-
Method Details
-
add
Creates then adds a reference at the end of the list.- Parameters:
uri- The uri of the reference to add.- Returns:
- True (as per the general contract of the Collection.add method).
-
getIdentifier
Returns the list identifier.- Returns:
- The list identifier.
-
getTextRepresentation
Returns a representation of the list in the "text/uri-list" format.- Returns:
- A representation of the list in the "text/uri-list" format.
-
getWebRepresentation
Returns a representation of the list in "text/html" format.- Returns:
- A representation of the list in "text/html" format.
-
setIdentifier
Sets the list reference.- Parameters:
identifier- The list identifier.
-
setIdentifier
Sets the list reference.- Parameters:
identifier- The list identifier as a URI.
-
subList
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
-