Package org.restlet.data
Class Preference<T extends Metadata>
java.lang.Object
org.restlet.data.Preference<T>
Metadata preference definition.
- Author:
- Jerome Louvel
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Preference(T metadata) Constructor.Preference(T metadata, float quality) Constructor.Preference(T metadata, float quality, Series<Parameter> parameters) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the metadata associated with this preference.Returns the modifiable list of parameters.floatReturns the quality/preference level.voidsetMetadata(T metadata) Sets the metadata associated with this preference.voidsetParameters(Series<Parameter> parameters) Sets the modifiable list of parameters.voidsetQuality(float quality) Sets the quality/preference level.toString()
-
Constructor Details
-
Preference
public Preference()Constructor. -
Preference
Constructor.- Parameters:
metadata- The associated metadata.
-
Preference
Constructor.- Parameters:
metadata- The associated metadata.quality- The quality/preference level.
-
Preference
Constructor.- Parameters:
metadata- The associated metadata.quality- The quality/preference level.parameters- The list of parameters.
-
-
Method Details
-
getMetadata
Returns the metadata associated with this preference.- Returns:
- The metadata associated with this preference.
-
getParameters
Returns the modifiable list of parameters. Creates a new instance if no one has been set.- Returns:
- The modifiable list of parameters.
-
getQuality
public float getQuality()Returns the quality/preference level.- Returns:
- The quality/preference level.
-
setMetadata
Sets the metadata associated with this preference.- Parameters:
metadata- The metadata associated with this preference.
-
setParameters
Sets the modifiable list of parameters.- Parameters:
parameters- The modifiable list of parameters.
-
setQuality
public void setQuality(float quality) Sets the quality/preference level.- Parameters:
quality- The quality/preference level.
-
toString
-