Class SortedSetRelation

java.lang.Object
com.ibm.icu.impl.SortedSetRelation

public class SortedSetRelation extends Object
Computationally efficient determination of the relationship between two SortedSets.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    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
    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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    static <T extends Object & Comparable<? super T>>
    boolean
    hasRelation(SortedSet<T> a, int allow, SortedSet<T> b)
    Utility that could be on SortedSet.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • A_NOT_B

      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
      See Also:
    • A_AND_B

      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
      See Also:
    • B_NOT_A

      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
      See Also:
    • ANY

      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.
      See Also:
    • CONTAINS

      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.
      See Also:
    • DISJOINT

      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.
      See Also:
    • ISCONTAINED

      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.
      See Also:
    • NO_B

      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.
      See Also:
    • EQUALS

      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.
      See Also:
    • NO_A

      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.
      See Also:
    • NONE

      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.
      See Also:
    • ADDALL

      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.
      See Also:
    • A

      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.
      See Also:
    • COMPLEMENTALL

      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.
      See Also:
    • B

      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.
      See Also:
    • REMOVEALL

      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.
      See Also:
    • RETAINALL

      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.
      See Also:
    • B_REMOVEALL

      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.
      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 set
      allow - 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 set
      relation - the relation filter, using ANY, CONTAINS, etc.
      b - second set
      Returns:
      the new set