org.apache.cassandra.dht

## Class Range.OrderedRangeContainmentChecker

- java.lang.Object
- - org.apache.cassandra.dht.Range.OrderedRangeContainmentChecker

- Enclosing class:
    Range<T extends RingPosition<T>>

      public static class Range.OrderedRangeContainmentChecker
      extends java.lang.Object

  Helper class to check if a token is contained within a given collection of ranges

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OrderedRangeContainmentChecker(java.util.Collection<Range<Token>> ranges)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `contains(Token t)` Returns true if the ranges given in the constructor contains the token, false otherwise.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OrderedRangeContainmentChecker

          public OrderedRangeContainmentChecker(java.util.Collection<Range<Token>> ranges)

  - ### Method Detail

    - #### contains

          public boolean contains(Token t)

      Returns true if the ranges given in the constructor contains the token, false otherwise. The tokens passed to this method must be in increasing order
      Parameters:
        `t` - token to check, must be larger than or equal to the last token passed
      Returns:
        true if the token is contained within the ranges given to the constructor.

Copyright © 2018 The Apache Software Foundation