Used to specify multiple hash-and-range primary keys.

@param hashKeyName
hash key name
@param rangeKeyName
range key name
@param alternatingHashAndRangeKeyValues
a list of alternating hash key value and range key value
512873
public TableKeysAndAttributes withHashAndRangeKeys(
            String hashKeyName, String rangeKeyName, 
            Object... alternatingHashAndRangeKeyValues) {
        if (hashKeyName == null)
            throw new IllegalArgumentException("hash key name must be specified");
        if (rangeKeyName == null)
            throw new IllegalArgumentException("range key name must be specified");
        if (alternatingHashAndRangeKeyValues.length % 2 != 0)
            throw new IllegalArgumentException("number of hash and range key values must be the same");
        final int len = alternatingHashAndRangeKeyValues.length / 2;
        PrimaryKey[] primaryKeys = new PrimaryKey[len];
        for (int i=0; i < alternatingHashAndRangeKeyValues.length; i += 2) {
            primaryKeys[i >> 1] = new PrimaryKey(
                hashKeyName, alternatingHashAndRangeKeyValues[i],
                rangeKeyName, alternatingHashAndRangeKeyValues[i+1]);
        }
        return withPrimaryKeys(primaryKeys);
    }
579968
@SuppressWarnings("WeakerAccess")
  public void dropRowRange(String tableId, String rowKeyPrefix) {
    ApiExceptions.callAndTranslateApiException(dropRowRangeAsync(tableId, rowKeyPrefix));
  }
57140
@Override
  final protected void addRange(int left, int right, int additionalId,
      long additionalRef, Integer id, Long ref) {
    String key = left + "_" + right;
    if (index.containsKey(key)) {
      index.get(key).addIdAndRef(id, ref, additionalId, additionalRef);
    } else {
      root = addRange(root, left, right, additionalId, additionalRef, id, ref);
      root.color = MtasRBTreeNode.BLACK;
    }
  }
1280619
@Override
  public List<String> indexKeys(String indexName, String indexKey) {
    lock.lock();
    try {
      if (!this.indexers.containsKey(indexName)) {
        throw new IllegalArgumentException(String.format("index %s doesn't exist!", indexName));
      }
      Map<String, Set<String>> index = this.indices.get(indexName);
      Set<String> set = index.get(indexKey);
      List<String> keys = new ArrayList<>(set.size());
      for (String key : set) {
        keys.add(key);
      }
      return keys;
    } finally {
      lock.unlock();
    }
  }
925581
public static KeySet range(KeyRange range) {
    return new KeySet(false, ImmutableList.<Key>of(), ImmutableList.of(range));
  }
983311
public Query range(ByteStringRange range) {
    RowRange.Builder rangeBuilder = RowRange.newBuilder();

    switch (range.getStartBound()) {
      case OPEN:
        rangeBuilder.setStartKeyOpen(range.getStart());
        break;
      case CLOSED:
        rangeBuilder.setStartKeyClosed(range.getStart());
        break;
      case UNBOUNDED:
        rangeBuilder.clearStartKey();
        break;
      default:
        throw new IllegalStateException("Unknown start bound: " + range.getStartBound());
    }

    switch (range.getEndBound()) {
      case OPEN:
        rangeBuilder.setEndKeyOpen(range.getEnd());
        break;
      case CLOSED:
        rangeBuilder.setEndKeyClosed(range.getEnd());
        break;
      case UNBOUNDED:
        rangeBuilder.clearEndKey();
        break;
      default:
        throw new IllegalStateException("Unknown end bound: " + range.getEndBound());
    }

    builder.getRowsBuilder().addRowRanges(rangeBuilder.build());

    return this;
  }
602777
@Override
    void collectRangeVariables(RangeVariable[] rangeVariables, Set set) {

        for (int i = 0; i < nodes.length; i++) {
            if (nodes[i] != null) {
                nodes[i].collectRangeVariables(rangeVariables, set);
            }
        }

        if (rangeVariable != null) {
            for (int i = 0; i < rangeVariables.length; i++) {
                if (rangeVariables[i] == rangeVariable) {
                    set.add(rangeVariables[i]);
                }
            }
        }
    }
744063
void collectRangeVariables(RangeVariable[] rangeVariables, Set set) {

        for (int i = 0; i < nodes.length; i++) {
            if (nodes[i] != null) {
                nodes[i].collectRangeVariables(rangeVariables, set);
            }
        }

        if (subQuery != null && subQuery.queryExpression != null) {
            HsqlList unresolvedExpressions =
                subQuery.queryExpression.getUnresolvedExpressions();

            if (unresolvedExpressions != null) {
                for (int i = 0; i < unresolvedExpressions.size(); i++) {
                    Expression e = (Expression) unresolvedExpressions.get(i);

                    e.collectRangeVariables(rangeVariables, set);
                }
            }
        }
    }
780972
public int[] hash(Key k){
      byte[] b = k.getBytes();
      if (b == null) {
        throw new NullPointerException("buffer reference is null");
      }
      if (b.length == 0) {
        throw new IllegalArgumentException("key length must be > 0");
      }
      int[] result = new int[nbHash];
      for (int i = 0, initval = 0; i < nbHash; i++) {
	  initval = hashFunction.hash(b, initval);
	  result[i] = Math.abs(initval % maxValue);
      }
      return result;
  }
596868
public static VersionRange intersection(VersionRange... ranges)
   {
      Assert.notNull(ranges, "Version ranges must not be null.");
      Assert.isTrue(ranges.length >= 1, "Version ranges must not be empty.");
      return intersection(Arrays.asList(ranges));
   }
961746
public function setPrimaryKey($hashValue, $rangeValue = null)
    {
        return $this->setIdentifier($this->class->createIdentifierFromValues($hashValue, $rangeValue));
    }
112414
public void flip(final long rangeStart, final long  rangeEnd) {
    rangeSanityCheck(rangeStart, rangeEnd);
    if (rangeStart >= rangeEnd) {
      return; // empty range
    }

    final int hbStart = BufferUtil.toIntUnsigned(BufferUtil.highbits(rangeStart));
    final int lbStart = BufferUtil.toIntUnsigned(BufferUtil.lowbits(rangeStart));
    final int hbLast = BufferUtil.toIntUnsigned(BufferUtil.highbits(rangeEnd - 1));
    final int lbLast = BufferUtil.toIntUnsigned(BufferUtil.lowbits(rangeEnd - 1));

    for (int hb = hbStart; hb <= hbLast; ++hb) {
      // first container may contain partial range
      final int containerStart = (hb == hbStart) ? lbStart : 0;
      // last container may contain partial range
      final int containerLast = (hb == hbLast) ? lbLast : BufferUtil.maxLowBitAsInteger();
      final int i = highLowContainer.getIndex((short) hb);

      if (i >= 0) {
        final MappeableContainer c =
            highLowContainer.getContainerAtIndex(i).inot(containerStart, containerLast + 1);
        if (!c.isEmpty()) {
          getMappeableRoaringArray().setContainerAtIndex(i, c);
        } else {
          getMappeableRoaringArray().removeAtIndex(i);
        }
      } else {
        getMappeableRoaringArray().insertNewKeyValueAt(-i - 1, (short) hb,
            MappeableContainer.rangeOfOnes(containerStart, containerLast + 1));
      }
    }
  }
719756
def setNumberRange(key, keyType, start, end):
    ''''''
    return And(
        And(keyType, error=SCHEMA_TYPE_ERROR % (key, keyType.__name__)),
        And(lambda n: start <= n <= end, error=SCHEMA_RANGE_ERROR % (key, '(%s,%s)' % (start, end))),
    )
1322989
public CursorIterator<T> iterate(final Txn<T> txn, final KeyRange<T> range) {
    return iterate(txn, range, null);
  }
136247
static KeyRange keyRangeSingleRow(byte[] rowKey) {
        KeyRange keyRange = new KeyRange();
        keyRange.setStart_key(rowKey);
        keyRange.setEnd_key(rowKey);
        keyRange.setCount(1);
        return keyRange;
    }
603489
def primary_key_attributes(self):
        
        if self.range_key is None:
            return (self.hash_key.name,)
        else:
            return (self.hash_key.name, self.range_key.name)
525475
function IDBKeyRange(lower, upper, lowerOpen, upperOpen){
        if (lower !== undefined) {
            idbModules.Key.validate(lower);
        }
        if (upper !== undefined) {
            idbModules.Key.validate(upper);
        }

        this.lower = lower;
        this.upper = upper;
        this.lowerOpen = !!lowerOpen;
        this.upperOpen = !!upperOpen;
    }