public class VariantListBuilderImpl extends Variant.VariantListBuilder
Variant.VariantListBuilder
.Constructor and Description |
---|
VariantListBuilderImpl() |
Modifier and Type | Method and Description |
---|---|
Variant.VariantListBuilder |
add()
Add the current combination of metadata to the list of supported variants,
after this method is called the current combination of metadata is emptied.
|
java.util.List<Variant> |
build()
Build a list of representation variants from the current state of
the builder.
|
Variant.VariantListBuilder |
encodings(java.lang.String... encodings)
Set the encoding[s] for this variant.
|
Variant.VariantListBuilder |
languages(java.util.Locale... languages)
Set the language[s] for this variant.
|
Variant.VariantListBuilder |
mediaTypes(MediaType... mediaTypes)
Set the media type[s] for this variant.
|
newInstance
public java.util.List<Variant> build()
Variant.VariantListBuilder
build
in class Variant.VariantListBuilder
public Variant.VariantListBuilder add()
Variant.VariantListBuilder
list
would have four members:
Listlist = VariantListBuilder.newInstance().languages("en","fr") .encodings("zip", "identity").add().build()
add
in class Variant.VariantListBuilder
public Variant.VariantListBuilder languages(java.util.Locale... languages)
Variant.VariantListBuilder
languages
in class Variant.VariantListBuilder
languages
- the available languagespublic Variant.VariantListBuilder encodings(java.lang.String... encodings)
Variant.VariantListBuilder
encodings
in class Variant.VariantListBuilder
encodings
- the available encodingspublic Variant.VariantListBuilder mediaTypes(MediaType... mediaTypes)
Variant.VariantListBuilder
mediaTypes
in class Variant.VariantListBuilder
mediaTypes
- the available mediaTypes. If specific charsets
are supported they should be included as parameters of the respective
media type.Copyright © 2016 Oracle Corporation. All Rights Reserved.