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
public abstract static class UResource.Value extends java.lang.Object
Represents a resource bundle item's value. Avoids object creations as much as possible. Mutable, not thread-safe.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Value()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.String
getAliasString()
abstract UResource.Array
getArray()
abstract java.nio.ByteBuffer
getBinary()
abstract int
getInt()
abstract int[]
getIntVector()
abstract java.lang.String
getString()
abstract java.lang.String[]
getStringArray()
abstract java.lang.String[]
getStringArrayOrStringAsArray()
Same asabstract java.lang.String
getStringOrFirstOfArray()
Same asabstract UResource.Table
getTable()
abstract int
getType()
abstract int
getUInt()
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.java.lang.String
toString()
Only for debugging.
-
-
-
Method Detail
-
getType
public abstract int getType()
- Returns:
- ICU resource type like
UResourceBundle.getType()
, for example,UResourceBundle.STRING
-
getString
public abstract java.lang.String getString()
- Throws:
UResourceTypeMismatchException
- if this is not a string resource- See Also:
UResourceBundle.getString()
-
getAliasString
public abstract java.lang.String 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:
UResourceBundle.getInt()
-
getUInt
public abstract int getUInt()
- Throws:
UResourceTypeMismatchException
- if this is not an integer resource- See Also:
UResourceBundle.getUInt()
-
getIntVector
public abstract int[] getIntVector()
- Throws:
UResourceTypeMismatchException
- if this is not an intvector resource- See Also:
UResourceBundle.getIntVector()
-
getBinary
public abstract java.nio.ByteBuffer getBinary()
- Throws:
UResourceTypeMismatchException
- if this is not a binary-blob resource- See Also:
UResourceBundle.getBinary()
-
getArray
public abstract UResource.Array getArray()
- Throws:
UResourceTypeMismatchException
- if this is not an array resource
-
getTable
public abstract UResource.Table 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
public abstract java.lang.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:
UResourceBundle.getStringArray()
-
getStringArrayOrStringAsArray
public abstract java.lang.String[] 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:
getString()
,getStringArray()
-
getStringOrFirstOfArray
public abstract java.lang.String 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:
getString()
,getStringArray()
-
toString
public java.lang.String toString()
Only for debugging.- Overrides:
toString
in classjava.lang.Object
-
-