org.restlet.engine.resource
Class VariantInfo

java.lang.Object
  extended by org.restlet.representation.Variant
      extended by org.restlet.engine.resource.VariantInfo

public class VariantInfo
extends Variant

Variant that is declared by an annotated Java method.

Author:
Jerome Louvel

Constructor Summary
VariantInfo(MediaType mediaType)
          Constructor.
VariantInfo(MediaType mediaType, AnnotationInfo annotationInfo)
          Constructor.
VariantInfo(Variant variant, AnnotationInfo annotationInfo)
          Constructor.
 
Method Summary
 boolean equals(Object other)
          Indicates if the current variant is equal to the given variant.
 AnnotationInfo getAnnotationInfo()
          Returns the optional annotation descriptor.
 float getInputScore()
          Returns the affinity between this variant and an incoming representation.
 void setInputScore(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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariantInfo

public VariantInfo(MediaType mediaType)
Constructor.

Parameters:
mediaType - The media type.

VariantInfo

public VariantInfo(MediaType mediaType,
                   AnnotationInfo annotationInfo)
Constructor.

Parameters:
mediaType - The media type.
annotationInfo - The optional annotation descriptor.

VariantInfo

public VariantInfo(Variant variant,
                   AnnotationInfo annotationInfo)
Constructor.

Parameters:
variant - The variant to enrich.
annotationInfo - The optional annotation descriptor.
Method Detail

equals

public boolean equals(Object other)
Indicates if the current variant is equal to the given variant.

Overrides:
equals in class Variant
Parameters:
other - The other variant.
Returns:
True if the current variant includes the other.

getAnnotationInfo

public AnnotationInfo 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.

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.


Copyright © 2005-2013 Restlet.