Class VariantInfo

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

public class VariantInfo extends Variant
Variant that is declared by an annotated Java method.
Author:
Jerome Louvel
  • Constructor Details

    • VariantInfo

      public VariantInfo(MediaType mediaType)
      Constructor.
      Parameters:
      mediaType - The media type.
    • VariantInfo

      public VariantInfo(MediaType mediaType, MethodAnnotationInfo annotationInfo)
      Constructor.
      Parameters:
      mediaType - The media type.
      annotationInfo - The optional annotation descriptor.
    • VariantInfo

      public VariantInfo(Variant variant, MethodAnnotationInfo annotationInfo)
      Constructor.
      Parameters:
      variant - The variant to enrich.
      annotationInfo - The optional annotation descriptor.
  • Method Details

    • 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 MethodAnnotationInfo 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()
      Overrides:
      hashCode in class Variant
    • 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.