Class SortedMetadata<T extends Metadata>
- java.lang.Object
-
- org.restlet.ext.jaxrs.internal.util.SortedMetadata<T>
-
- Type Parameters:
T- the Metadata type the instance contains.
- All Implemented Interfaces:
java.lang.Iterable<T>
@Deprecated public class SortedMetadata<T extends Metadata> extends java.lang.Object implements java.lang.Iterable<T>Deprecated.Will be removed in next minor release.SortedMetadata contains given Metadata, sorted by it's quality, Metadata with the highest quality first.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classSortedMetadata.IteratorIterator<T extends Metadata>Deprecated.
-
Constructor Summary
Constructors Modifier Constructor Description privateSortedMetadata(java.util.Collection<Preference<T>> preferences)Deprecated.Creates a new SortedMetadata from the given Metadata.privateSortedMetadata(java.util.List<java.util.Collection<T>> metadatas)Deprecated.Creates a new SortedMetadata from the sorted Metadata.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SortedMetadata<MediaType>get(MediaType respMediaType)Deprecated.static SortedMetadata<MediaType>getEmptyMediaTypes()Deprecated.Returns an empty SortedMetadatastatic SortedMetadata<Language>getForLanguages(java.util.Collection<Preference<Language>> preferences)Deprecated.Creates a newSortedMetadataforMediaTypes.static SortedMetadata<MediaType>getForMediaTypes(java.util.Collection<Preference<MediaType>> preferences)Deprecated.Creates a newSortedMetadataforMediaTypes.static SortedMetadata<MediaType>getMediaTypeAll()Deprecated.Creates a SortedMetadata collection with exactly theMediaType'*/*''booleanisEmpty()Deprecated.Checks, if this SortedMetadata is emptyjava.util.Iterator<T>iterator()Deprecated.Iterates over all the sorted Metadata.java.lang.Iterable<java.lang.Iterable<T>>listOfColls()Deprecated.Returns the list of collections asIterableofIterables.static SortedMetadata<MediaType>singleton(MediaType mediaType)Deprecated.java.lang.StringtoString()Deprecated.
-
-
-
Constructor Detail
-
SortedMetadata
private SortedMetadata(java.util.Collection<Preference<T>> preferences)
Deprecated.Creates a new SortedMetadata from the given Metadata.- Parameters:
preferences-
-
SortedMetadata
private SortedMetadata(java.util.List<java.util.Collection<T>> metadatas)
Deprecated.Creates a new SortedMetadata from the sorted Metadata.- Parameters:
metadatas-
-
-
Method Detail
-
get
public static SortedMetadata<MediaType> get(MediaType respMediaType)
Deprecated.- Parameters:
respMediaType-- Returns:
- the media type as singleton of SortedMetadata
-
getEmptyMediaTypes
public static SortedMetadata<MediaType> getEmptyMediaTypes()
Deprecated.Returns an empty SortedMetadata- Returns:
- an empty SortedMetadata
-
getForLanguages
public static SortedMetadata<Language> getForLanguages(java.util.Collection<Preference<Language>> preferences)
Deprecated.Creates a newSortedMetadataforMediaTypes.- Parameters:
preferences-- Returns:
- the given languages as SortedMetadata
-
getForMediaTypes
public static SortedMetadata<MediaType> getForMediaTypes(java.util.Collection<Preference<MediaType>> preferences)
Deprecated.Creates a newSortedMetadataforMediaTypes. If the given Collection is empty,MediaType.ALLis returned.- Parameters:
preferences-- Returns:
- the given media type as SortedMetadata
-
getMediaTypeAll
public static SortedMetadata<MediaType> getMediaTypeAll()
Deprecated.Creates a SortedMetadata collection with exactly theMediaType'*/*''- Returns:
- '*/*'' as SortedMediaType
- See Also:
MediaType.ALL
-
singleton
public static SortedMetadata<MediaType> singleton(MediaType mediaType)
Deprecated.- Parameters:
mediaType-- Returns:
- the media type as singleton as SortedMetadata
- See Also:
Collections.singleton(Object)
-
isEmpty
public boolean isEmpty()
Deprecated.Checks, if this SortedMetadata is empty- Returns:
- true, if this sorted metadata is empty, or false if not.
- See Also:
Collection.isEmpty()
-
iterator
public java.util.Iterator<T> iterator()
Deprecated.Iterates over all the sorted Metadata.
-
listOfColls
public java.lang.Iterable<java.lang.Iterable<T>> listOfColls()
Deprecated.Returns the list of collections asIterableofIterables.- Returns:
- the list of collections as
IterableofIterables.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-