Methods Summary |
---|
public void | addLanguage(java.lang.String language)This method adds a language.
if (language.length() < MetadataDescriptor.MAX_LANG_INDEX) {
if (!this.languages.contains(language)) {
this.languages.add(language);
}
} else {
throw new IllegalArgumentException(
ErrorMessage.WMA_LENGTH_OF_LANGUAGE_IS_TOO_LARGE
.getMsg(language.length() * 2 + 2));
}
|
public java.lang.String | getLanguage(int index)Returns the language code at the specified index.
return this.languages.get(index);
|
public int | getLanguageCount()Returns the amount of stored language codes.
return this.languages.size();
|
public java.util.List | getLanguages()Returns all language codes in list.
return new ArrayList<String>(this.languages);
|
public java.lang.String | prettyPrint(java.lang.String prefix){@inheritDoc}
final StringBuilder result = new StringBuilder(super.prettyPrint(prefix));
for (int i = 0; i < getLanguageCount(); i++) {
result.append(prefix);
result.append(" |-> ");
result.append(i);
result.append(" : ");
result.append(getLanguage(i));
result.append(Utils.LINE_SEPARATOR);
}
return result.toString();
|
public void | removeLanguage(int index)Removes the language entry at specified index.
this.languages.remove(index);
|