/** Create a builder - convenience operation to * take the language name and content type * which should be set if at all possible. * @param langname * @param officialContentType */ public static LangBuilder create(String langname, String officialContentType) { return new LangBuilder() .langName(langname) .contentType(officialContentType) ; }
/** Add alternative content types */ public LangBuilder addAltContentTypes(String...x) { copy(x, contentTypes) ; return this ; }
Lang.CSV = LangBuilder.create(strLangCSV, contentTypeTextCSV) .addAltNames("csv") .addFileExtensions("csv") .build() ; Lang.TSV = LangBuilder.create(strLangTSV, contentTypeTextTSV) .addAltNames("tsv") .addFileExtensions("tsv") .build() ;
/** Create a builder */ public static LangBuilder create() { return new LangBuilder() ; }
/** Create a builder */ public static LangBuilder create() { return new LangBuilder() ; }
/** Create a builder - convenience operation to * take the language name and content type * which should be set if at all possible. * @param langname * @param officialContentType */ public static LangBuilder create(String langname, String officialContentType) { return new LangBuilder() .langName(langname) .contentType(officialContentType) ; }
/** Add alternative names */ public LangBuilder addAltNames(String...x) { copy(x, altNames) ; return this ; }
/** Add alternative content types */ public LangBuilder addAltContentTypes(String...x) { copy(x, contentTypes) ; return this ; }
/** Add file name extensions */ public LangBuilder addFileExtensions(String...x) { copy(x, fileExtensions) ; return this ; }
/** Add alternative names */ public LangBuilder addAltNames(String...x) { copy(x, altNames) ; return this ; }
/** Add file name extensions */ public LangBuilder addFileExtensions(String...x) { copy(x, fileExtensions) ; return this ; }