Package com.ibm.icu.impl
Class SortedSetRelation
java.lang.Object
com.ibm.icu.impl.SortedSetRelation
Computationally efficient determination of the relationship between
two SortedSets.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
There are 8 combinations of the relationship bits.static final int
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.static final int
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.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits.static final int
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.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits.static final int
There are 8 combinations of the relationship bits. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Object & Comparable<? super T>>
SortedSet<? extends T>doOperation
(SortedSet<T> a, int relation, SortedSet<T> b) Utility that could be on SortedSet.static <T extends Object & Comparable<? super T>>
booleanhasRelation
(SortedSet<T> a, int allow, SortedSet<T> b) Utility that could be on SortedSet.
-
Field Details
-
A_NOT_B
public static final int A_NOT_BThe 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- See Also:
-
A_AND_B
public static final int A_AND_BThe 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- See Also:
-
B_NOT_A
public static final int B_NOT_AThe 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- See Also:
-
ANY
public static final int ANYThere 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.- See Also:
-
CONTAINS
public static final int CONTAINSThere 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.- See Also:
-
DISJOINT
public static final int DISJOINTThere 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.- See Also:
-
ISCONTAINED
public static final int ISCONTAINEDThere 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.- See Also:
-
NO_B
public static final int NO_BThere 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.- See Also:
-
EQUALS
public static final int EQUALSThere 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.- See Also:
-
NO_A
public static final int NO_AThere 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.- See Also:
-
NONE
public static final int NONEThere 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.- See Also:
-
ADDALL
public static final int ADDALLThere 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.- See Also:
-
A
public static final int AThere 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.- See Also:
-
COMPLEMENTALL
public static final int COMPLEMENTALLThere 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.- See Also:
-
B
public static final int BThere 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.- See Also:
-
REMOVEALL
public static final int REMOVEALLThere 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.- See Also:
-
RETAINALL
public static final int RETAINALLThere 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.- See Also:
-
B_REMOVEALL
public static final int B_REMOVEALLThere 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.- See Also:
-
-
Constructor Details
-
SortedSetRelation
public SortedSetRelation()
-
-
Method Details
-
hasRelation
public static <T extends Object & 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
- first setallow
- filter, using ANY, CONTAINS, etc.b
- second set- Returns:
- whether the filter relationship is true or not.
-
doOperation
public static <T extends Object & 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
- first setrelation
- the relation filter, using ANY, CONTAINS, etc.b
- second set- Returns:
- the new set
-