Class TreeRangeSet.Complement

  • All Implemented Interfaces:
    RangeSet<C>, java.io.Serializable
    Enclosing class:
    TreeRangeSet<C extends java.lang.Comparable<?>>

    private final class TreeRangeSet.Complement
    extends TreeRangeSet<C>
    • Constructor Detail

      • Complement

        Complement()
    • Method Detail

      • add

        public void add​(Range<C> rangeToAdd)
        Description copied from interface: RangeSet
        Adds the specified range to this RangeSet (optional operation). That is, for equal range sets a and b, the result of a.add(range) is that a will be the minimal range set for which both a.enclosesAll(b) and a.encloses(range).

        Note that range will be coalesced with any ranges in the range set that are connected with it. Moreover, if range is empty, this is a no-op.

        Specified by:
        add in interface RangeSet<C extends java.lang.Comparable<?>>
        Overrides:
        add in class TreeRangeSet<C extends java.lang.Comparable<?>>
      • remove

        public void remove​(Range<C> rangeToRemove)
        Description copied from interface: RangeSet
        Removes the specified range from this RangeSet (optional operation). After this operation, if range.contains(c), this.contains(c) will return false.

        If range is empty, this is a no-op.

        Specified by:
        remove in interface RangeSet<C extends java.lang.Comparable<?>>
        Overrides:
        remove in class TreeRangeSet<C extends java.lang.Comparable<?>>
      • contains

        public boolean contains​(C value)
        Description copied from interface: RangeSet
        Determines whether any of this range set's member ranges contains value.
        Specified by:
        contains in interface RangeSet<C extends java.lang.Comparable<?>>
        Overrides:
        contains in class AbstractRangeSet<C extends java.lang.Comparable<?>>