Class LocalizedString.PlaceholderMetadata
java.lang.Object
com.lokalized.LocalizedString.PlaceholderMetadata
- Enclosing class:
LocalizedString
Translator-facing metadata for a single placeholder.
This metadata is informational and is not used by runtime string evaluation. It is intended to improve translator context and to support documentation or linting tools.
- Author:
- Mark Allen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to another one.Gets the allowed values for this placeholder.Gets the commentary for this placeholder.Gets an example value for this placeholder.getType()Gets the translator-facing type label for this placeholder.inthashCode()A hash code for this object.toString()Generates aStringrepresentation of this object.
-
Constructor Details
-
PlaceholderMetadata
public PlaceholderMetadata(@Nullable String type, @Nullable String commentary, @Nullable String example, @Nullable Set<@NonNull String> allowedValues) Constructs placeholder metadata.- Parameters:
type- translator-facing type label, for exampleSTRING,NUMBER, orGENDER, may be nullcommentary- commentary describing how the placeholder is used, may be nullexample- example placeholder value, may be nullallowedValues- allowed values for the placeholder as an insertion-ordered set, may be null
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getType
-
getCommentary
Gets the commentary for this placeholder.- Returns:
- the commentary for this placeholder, not null
-
getExample
Gets an example value for this placeholder.- Returns:
- an example value for this placeholder, not null
-
getAllowedValues
Gets the allowed values for this placeholder.- Returns:
- the allowed values for this placeholder, not null
-