Top Description Fields Constructors Methods
com.ibm.icu.impl

public final Class USerializedSet

extends Object
Class Inheritance

Simple class for handling serialized USet/UnicodeSet structures without object creation. See ICU4C icu/source/common/uset.c.
ICU Status
Internal ICU component.

Field Summary

Modifier and TypeField and Description
private char[]
private int
private int
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final boolean

Returns:

true if set contains c
contains
(int
the character to test for
c
)

Returns true if the given USerializedSet contains the given character.

public final int

Returns:

a non-negative integer counting the character ranges contained in set
countRanges
()

Returns the number of disjoint ranges of characters contained in the given serialized set.

public final boolean

Returns:

true if rangeIndex is valid, otherwise false
getRange
(int
a non-negative integer in the range 0.. getSerializedRangeCount()-1
rangeIndex
,
int[]
variable to receive the data in the range
range
)

Returns a range of characters contained in the given serialized set.

public final boolean

Returns:

true if the given array is valid, otherwise false
getSet
(char[]
pointer to start of array
src
,
int
pointer to start of serialized data (length value)
srcStart
)

Fill in the given serialized set object.

public final void
setToOne(int c)

Set the USerializedSet to contain the given character (and nothing else).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

arrayback to summary
private char[] array
arrayOffsetback to summary
private int arrayOffset
bmpLengthback to summary
private int bmpLength
lengthback to summary
private int length

Constructor Detail

USerializedSetback to summary
public USerializedSet()

Method Detail

containsback to summary
public final boolean contains(int c)

Returns true if the given USerializedSet contains the given character.

Parameters
c:int

the character to test for

Returns:boolean

true if set contains c

countRangesback to summary
public final int countRanges()

Returns the number of disjoint ranges of characters contained in the given serialized set. Ignores any strings contained in the set.

Returns:int

a non-negative integer counting the character ranges contained in set

getRangeback to summary
public final boolean getRange(int rangeIndex, int[] range)

Returns a range of characters contained in the given serialized set.

Parameters
rangeIndex:int

a non-negative integer in the range 0.. getSerializedRangeCount()-1

range:int[]

variable to receive the data in the range

Returns:boolean

true if rangeIndex is valid, otherwise false

getSetback to summary
public final boolean getSet(char[] src, int srcStart)

Fill in the given serialized set object.

Parameters
src:char[]

pointer to start of array

srcStart:int

pointer to start of serialized data (length value)

Returns:boolean

true if the given array is valid, otherwise false

setToOneback to summary
public final void setToOne(int c)

Set the USerializedSet to contain the given character (and nothing else).