javax.ws.rs.core
Class Variant

java.lang.Object
  extended by javax.ws.rs.core.Variant

public class Variant
extends java.lang.Object

Abstraction for a resource representation variant.


Nested Class Summary
static class Variant.VariantListBuilder
          A builder for a list of representation variants.
 
Constructor Summary
Variant(MediaType mediaType, java.lang.String language, java.lang.String encoding)
          Create a new instance of Variant
 
Method Summary
 java.lang.String getEncoding()
          Get the encoding of the variant
 java.lang.String getLanguage()
          Get the language of the variant
 MediaType getMediaType()
          Get the media type of the variant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Variant

public Variant(MediaType mediaType,
               java.lang.String language,
               java.lang.String encoding)
Create a new instance of Variant

Parameters:
mediaType - the media type of the variant - may be null
language - the language of the variant - may be null
encoding - the content encoding of the variant - may be null
Method Detail

getLanguage

public java.lang.String getLanguage()
Get the language of the variant

Returns:
the language or null if none set

getMediaType

public MediaType getMediaType()
Get the media type of the variant

Returns:
the media type or null if none set

getEncoding

public java.lang.String getEncoding()
Get the encoding of the variant

Returns:
the encoding or null if none set


Copyright © 2008. All Rights Reserved.