Class LangString
java.lang.Object
dev.jcputney.elearning.parser.input.xapi.types.LangString
- All Implemented Interfaces:
Serializable
Represents a single localized string with an optional language attribute.
Defined in the schema as:
<xs:element name="langstring" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="lang" type="xs:language"/>
<xs:attributeGroup ref="anyAttribute"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault no-argument constructor for the LangString class.LangString(String value, String lang) Constructs a newLangStringwith the specified value and language. -
Method Summary
-
Constructor Details
-
LangString
Constructs a newLangStringwith the specified value and language.- Parameters:
value- the actual text content of the localized stringlang- the language of the string, represented as aString; this value is optional
-
LangString
public LangString()Default no-argument constructor for the LangString class. Initializes a new instance of LangString with no initial value or language set.
-
-
Method Details
-
getValue
Retrieves the value of the localized string.- Returns:
- the actual text content of the localized string
-
setValue
Sets the value of the localized string.- Parameters:
value- the text content to set for the localized string
-
getLang
Retrieves the language associated with the localized string.- Returns:
- the language of the string as a
String, ornullif not set
-
setLang
Sets the language attribute for the localized string.- Parameters:
lang- the language to associate with the string, represented as aString
-
equals
-
hashCode
public int hashCode()
-