public class LangBuilder extends Object
LangBuilder.create() .langName("MyLang") .contentType("application/wizard") .addAltContentTypes(...) .addFileExtensions("ext1", "ext2") .build()
Modifier and Type | Field and Description |
---|---|
List<String> |
altNames |
List<String> |
contentTypes |
List<String> |
fileExtensions |
String |
lang |
String |
officialContentType |
Modifier and Type | Method and Description |
---|---|
LangBuilder |
addAltContentTypes(String... x)
Add alternative content types
|
LangBuilder |
addAltNames(String... x)
Add alternative names
|
LangBuilder |
addFileExtensions(String... x)
Add file name extensions
|
Lang |
build()
Construct the
Lang |
LangBuilder |
contentType(String officialContentType)
Set the main content type for this language.
|
static LangBuilder |
create()
Create a builder
|
static LangBuilder |
create(String langname,
String officialContentType)
Create a builder - convenience operation to
take the language name and content type
which should be set if at all possible.
|
String |
getContentType() |
LangBuilder |
langName(String langname)
Set the language label.
|
public static LangBuilder create()
public static LangBuilder create(String langname, String officialContentType)
langname
- officialContentType
- public LangBuilder addAltNames(String... x)
public LangBuilder addAltContentTypes(String... x)
public LangBuilder addFileExtensions(String... x)
public String getContentType()
public LangBuilder contentType(String officialContentType)
public LangBuilder langName(String langname)
Licenced under the Apache License, Version 2.0