@Override
  public long get(long key) {
    long byteOffset = key << 3;
    int idx = (int) (byteOffset >>> segmentBits);
    if (idx >= segments.size()) {
      return LongLongMap.MISSING_VALUE;
    }
    int offset = (int) (byteOffset & segmentMask);
    ByteBuffer byteBuffer = segments.get(idx);
    if (byteBuffer == null) {
      return LongLongMap.MISSING_VALUE;
    }
    long result = byteBuffer.getLong(offset);
    return result == 0 ? LongLongMap.MISSING_VALUE : result;
  }
A map from sequential {@code long} keys to {@code long} values backed by {@link ByteBuffer ByteBuffers} segments
in-memory where key defines the segment and offset into that segment.
planetiler-core/src/main/java/com/onthegomap/planetiler/collection/ArrayLongLongMapRam.java