Package org.restlet.engine.resource
Class VariantInfo
java.lang.Object
org.restlet.representation.Variant
org.restlet.engine.resource.VariantInfo
Variant that is declared by an annotated Java method.
- Author:
- Jerome Louvel
-
Constructor Summary
ConstructorsConstructorDescriptionVariantInfo(MediaType mediaType) Constructor.VariantInfo(MediaType mediaType, MethodAnnotationInfo annotationInfo) Constructor.VariantInfo(Variant variant, MethodAnnotationInfo annotationInfo) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates if the current variant is equal to the given variant.Returns the optional annotation descriptor.floatReturns the affinity between this variant and an incoming representation.inthashCode()voidsetInputScore(float inputScore) Sets the affinity between this variant and an incoming representation.Methods inherited from class org.restlet.representation.Variant
createClientInfo, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
-
Constructor Details
-
VariantInfo
Constructor.- Parameters:
mediaType- The media type.
-
VariantInfo
Constructor.- Parameters:
mediaType- The media type.annotationInfo- The optional annotation descriptor.
-
VariantInfo
Constructor.- Parameters:
variant- The variant to enrich.annotationInfo- The optional annotation descriptor.
-
-
Method Details
-
equals
Indicates if the current variant is equal to the given variant. -
getAnnotationInfo
Returns the optional annotation descriptor.- Returns:
- The optional annotation descriptor.
-
getInputScore
public float getInputScore()Returns the affinity between this variant and an incoming representation.- Returns:
- The affinity between this variant and an incoming representation.
-
hashCode
public int hashCode() -
setInputScore
public void setInputScore(float inputScore) Sets the affinity between this variant and an incoming representation.- Parameters:
inputScore- The affinity between this variant and an incoming representation.
-