Package com.ibm.icu.impl
Class UResource.Value
java.lang.Object
com.ibm.icu.impl.UResource.Value
- Direct Known Subclasses:
ICUResourceBundleReader.ReaderValue
- Enclosing class:
UResource
Represents a resource bundle item's value.
Avoids object creations as much as possible.
Mutable, not thread-safe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
abstract UResource.Array
getArray()
abstract ByteBuffer
abstract int
getInt()
abstract int[]
abstract String
abstract String[]
abstract String[]
Same asabstract String
Same asabstract UResource.Table
getTable()
abstract int
getType()
abstract int
getUInt()
abstract boolean
Is this a no-fallback/no-inheritance marker string? Such a marker is used for CLDR no-fallback data values of "∅∅∅" when enumerating tables with fallback from the specific resource bundle to root.toString()
Only for debugging.
-
Constructor Details
-
Value
protected Value()
-
-
Method Details
-
getType
public abstract int getType()- Returns:
- ICU resource type like
UResourceBundle.getType()
, for example,UResourceBundle.STRING
-
getString
- Throws:
UResourceTypeMismatchException
- if this is not a string resource- See Also:
-
getAliasString
- Throws:
UResourceTypeMismatchException
- if this is not an alias resource
-
getInt
public abstract int getInt()- Throws:
UResourceTypeMismatchException
- if this is not an integer resource- See Also:
-
getUInt
public abstract int getUInt()- Throws:
UResourceTypeMismatchException
- if this is not an integer resource- See Also:
-
getIntVector
public abstract int[] getIntVector()- Throws:
UResourceTypeMismatchException
- if this is not an intvector resource- See Also:
-
getBinary
- Throws:
UResourceTypeMismatchException
- if this is not a binary-blob resource- See Also:
-
getArray
- Throws:
UResourceTypeMismatchException
- if this is not an array resource
-
getTable
- Throws:
UResourceTypeMismatchException
- if this is not a table resource
-
isNoInheritanceMarker
public abstract boolean isNoInheritanceMarker()Is this a no-fallback/no-inheritance marker string? Such a marker is used for CLDR no-fallback data values of "∅∅∅" when enumerating tables with fallback from the specific resource bundle to root.- Returns:
- true if this is a no-inheritance marker string
-
getStringArray
- Returns:
- the array of strings in this array resource.
- Throws:
UResourceTypeMismatchException
- if this is not an array resource or if any of the array items is not a string- See Also:
-
getStringArrayOrStringAsArray
Same asif (getType() == STRING) { return new String[] { getString(); } } else { return getStringArray(); }
- Throws:
UResourceTypeMismatchException
- if this is neither a string resource nor an array resource containing strings- See Also:
-
getStringOrFirstOfArray
Same asif (getType() == STRING) { return getString(); } else { return getStringArray()[0]; }
- Throws:
UResourceTypeMismatchException
- if this is neither a string resource nor an array resource containing strings- See Also:
-
toString
Only for debugging.
-