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

public Class SortedSetRelation

extends Object
Class Inheritance
Imports
java.util.Iterator, .SortedSet, .TreeSet

Computationally efficient determination of the relationship between two SortedSets.

Field Summary

Modifier and TypeField and Description
public static final int
A

There are 8 combinations of the relationship bits.

public static final int
A_AND_B

The relationship between two sets A and B can be determined by looking at: A - B A & B (intersection) B - A These are represented by a set of bits.

public static final int
A_NOT_B

The relationship between two sets A and B can be determined by looking at: A - B A & B (intersection) B - A These are represented by a set of bits.

public static final int
ADDALL

There are 8 combinations of the relationship bits.

public static final int
ANY

There are 8 combinations of the relationship bits.

public static final int
B

There are 8 combinations of the relationship bits.

public static final int
B_NOT_A

The relationship between two sets A and B can be determined by looking at: A - B A & B (intersection) B - A These are represented by a set of bits.

public static final int
B_REMOVEALL

There are 8 combinations of the relationship bits.

public static final int
COMPLEMENTALL

There are 8 combinations of the relationship bits.

public static final int
CONTAINS

There are 8 combinations of the relationship bits.

public static final int
DISJOINT

There are 8 combinations of the relationship bits.

public static final int
EQUALS

There are 8 combinations of the relationship bits.

public static final int
ISCONTAINED

There are 8 combinations of the relationship bits.

public static final int
NO_A

There are 8 combinations of the relationship bits.

public static final int
NO_B

There are 8 combinations of the relationship bits.

public static final int
NONE

There are 8 combinations of the relationship bits.

public static final int
REMOVEALL

There are 8 combinations of the relationship bits.

public static final int
RETAINALL

There are 8 combinations of the relationship bits.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <T extends Comparable<? super T>> SortedSet<? extends T>

Returns:

the new set
doOperation
(SortedSet<T>
first set
a
,
int
the relation filter, using ANY, CONTAINS, etc.
relation
,
SortedSet<T>
second set
b
)

Utility that could be on SortedSet.

public static <T extends Comparable<? super T>> boolean

Returns:

whether the filter relationship is true or not.
hasRelation
(SortedSet<T>
first set
a
,
int
filter, using ANY, CONTAINS, etc.
allow
,
SortedSet<T>
second set
b
)

Utility that could be on SortedSet.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

Aback to summary
public static final int A

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

A_AND_Bback to summary
public static final int A_AND_B

The relationship between two sets A and B can be determined by looking at: A - B A & B (intersection) B - A These are represented by a set of bits. Bit 2 is true if A - B is not empty Bit 1 is true if A & B is not empty BIT 0 is true if B - A is not empty

A_NOT_Bback to summary
public static final int A_NOT_B

The relationship between two sets A and B can be determined by looking at: A - B A & B (intersection) B - A These are represented by a set of bits. Bit 2 is true if A - B is not empty Bit 1 is true if A & B is not empty BIT 0 is true if B - A is not empty

ADDALLback to summary
public static final int ADDALL

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

ANYback to summary
public static final int ANY

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

Bback to summary
public static final int B

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

B_NOT_Aback to summary
public static final int B_NOT_A

The relationship between two sets A and B can be determined by looking at: A - B A & B (intersection) B - A These are represented by a set of bits. Bit 2 is true if A - B is not empty Bit 1 is true if A & B is not empty BIT 0 is true if B - A is not empty

B_REMOVEALLback to summary
public static final int B_REMOVEALL

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

COMPLEMENTALLback to summary
public static final int COMPLEMENTALL

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

CONTAINSback to summary
public static final int CONTAINS

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

DISJOINTback to summary
public static final int DISJOINT

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

EQUALSback to summary
public static final int EQUALS

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

ISCONTAINEDback to summary
public static final int ISCONTAINED

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

NO_Aback to summary
public static final int NO_A

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

NO_Bback to summary
public static final int NO_B

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

NONEback to summary
public static final int NONE

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

REMOVEALLback to summary
public static final int REMOVEALL

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

RETAINALLback to summary
public static final int RETAINALL

There are 8 combinations of the relationship bits. These correspond to the filters (combinations of allowed bits) in hasRelation. They also correspond to the modification functions, listed in comments.

Constructor Detail

SortedSetRelationback to summary
public SortedSetRelation()

Method Detail

doOperationback to summary
public static <T extends Comparable<? super T>> SortedSet<? extends T> doOperation(SortedSet<T> a, int relation, SortedSet<T> b)

Utility that could be on SortedSet. Allows faster implementation than what is in Java for doing addAll, removeAll, retainAll, (complementAll).

Parameters
a:SortedSet<T>

first set

relation:int

the relation filter, using ANY, CONTAINS, etc.

b:SortedSet<T>

second set

Returns:SortedSet<? extends T>

the new set

hasRelationback to summary
public static <T extends Comparable<? super T>> boolean hasRelation(SortedSet<T> a, int allow, SortedSet<T> b)

Utility that could be on SortedSet. Faster implementation than what is in Java for doing contains, equals, etc.

Parameters
a:SortedSet<T>

first set

allow:int

filter, using ANY, CONTAINS, etc.

b:SortedSet<T>

second set

Returns:boolean

whether the filter relationship is true or not.