Returns a stream of the specified range of the given {@link LongTuple}

@param tuple The tuple
@param startInclusive The start index, inclusive
@param endExclusive  The end index, exclusive
@return The stream
321849
static LongStream stream(
        LongTuple tuple, int startInclusive, int endExclusive) 
    {
        LongTupleSpliterator longTupleSpliterator = 
            new LongTupleSpliterator(
                tuple, startInclusive, endExclusive);
        return StreamSupport.longStream(longTupleSpliterator, false);
    }
1343647
function slice(input, begin=0, end=Infinity) {
  if (isStream(input)) {
    if (begin >= 0 && end >= 0) {
      let bytesRead = 0;
      return transformRaw(input, {
        transform(value, controller) {
          if (bytesRead < end) {
            if (bytesRead + value.length >= begin) {
              controller.enqueue(slice(value, Math.max(begin - bytesRead, 0), end - bytesRead));
            }
            bytesRead += value.length;
          } else {
            controller.terminate();
          }
        }
      });
    }
    if (begin < 0 && (end < 0 || end === Infinity)) {
      let lastBytes = [];
      return transform(input, value => {
        if (value.length >= -begin) lastBytes = [value];
        else lastBytes.push(value);
      }, () => slice(concat(lastBytes), begin, end));
    }
    if (begin === 0 && end < 0) {
      let lastBytes;
      return transform(input, value => {
        const returnValue = lastBytes ? concat([lastBytes, value]) : value;
        if (returnValue.length >= -end) {
          lastBytes = slice(returnValue, end);
          return slice(returnValue, begin, end);
        } else {
          lastBytes = returnValue;
        }
      });
    }
    console.warn(`stream.slice(input, ${begin}, ${end}) not implemented efficiently.`);
    return fromAsync(async () => slice(await readToEnd(input), begin, end));
  }
  if (input[externalBuffer]) {
    input = concat(input[externalBuffer].concat([input]));
  }
  if (isUint8Array(input) && !(NodeBuffer && NodeBuffer.isBuffer(input))) {
    if (end === Infinity) end = input.length;
    return input.subarray(begin, end);
  }
  return input.slice(begin, end);
}
470827
public <T> List<T> range(long start,long end){
    	Set<byte[]> result = null;
        try {    		
        	if(isCluster(groupName)){
        		result = getBinaryJedisClusterCommands(groupName).zrange(keyBytes, start, end);
        	}else{
        		result = getBinaryJedisCommands(groupName).zrange(keyBytes, start, end);
        	}
        	return toObjectList(new ArrayList<>(result));
    	} finally{
			getJedisProvider(groupName).release();
		}
	}
207395
public static LongStream rangeValues(Protos.Value.Range range) {
		checkNotNull(range);
		return LongStream.rangeClosed(range.getBegin(), range.getEnd());
	}
1041548
private static long start(Range<Long> range) {
        if (range.lowerBoundType() == BoundType.OPEN) {
            return DiscreteDomain.longs().next(range.lowerEndpoint());
        } else {
            return range.lowerEndpoint();
        }
    }
115615
protected <T> Stream<T> streamOfType(BeanResolutionContext resolutionContext, Class<T> beanType, Qualifier<T> qualifier) {
        return getBeansOfTypeInternal(resolutionContext, beanType, qualifier).stream();
    }
1006148
@Override
    public java.util.concurrent.Future<DescribeStreamResult> describeStreamAsync(String streamName, Integer limit, String exclusiveStartShardId) {

        return describeStreamAsync(new DescribeStreamRequest().withStreamName(streamName).withLimit(limit).withExclusiveStartShardId(exclusiveStartShardId));
    }
856033
@Override
    public final LongStream asLongStream() {
        return new LongPipeline.StatelessOp<Integer>(this, StreamShape.INT_VALUE,
                                                     StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) {
            @Override
            public Sink<Integer> opWrapSink(int flags, Sink<Long> sink) {
                return new Sink.ChainedInt<Long>(sink) {
                    @Override
                    public void accept(int t) {
                        downstream.accept((long) t);
                    }
                };
            }
        };
    }
598969
public static <U> Stream<U> stream(final Iterable<U> it) {
        return StreamSupport.stream(it.spliterator(), false);
    }
831296
@NotNull
    public static Stream<Long> rangeClosed(final long from, final long to) {
        return LongStream.rangeClosed(from, to).boxed();
    }
989337
public static <T> Stream<T> ofNullable(Iterable<T> iterable) {
        return null == iterable ? Stream.empty() : stream(iterable);
    }
544501
@SuppressWarnings("resource")
    public static <R> Stream<R> zip(final Collection<? extends LongStream> c, final LongNFunction<R> zipFunction) {
        if (N.isNullOrEmpty(c)) {
            return Stream.empty();
        }

        final int len = c.size();
        final LongIterator[] iters = new LongIterator[len];
        int i = 0;

        for (LongStream s : c) {
            iters[i++] = s.iteratorEx();
        }

        return new IteratorStream<>(new ObjIteratorEx<R>() {
            @Override
            public boolean hasNext() {
                for (int i = 0; i < len; i++) {
                    if (iters[i].hasNext() == false) {
                        return false;
                    }
                }

                return true;
            }

            @Override
            public R next() {
                final long[] args = new long[len];

                for (int i = 0; i < len; i++) {
                    args[i] = iters[i].nextLong();
                }

                return zipFunction.apply(args);
            }
        }).onClose(newCloseHandler(c));
    }
1214311
public <T0, T1> SingleOutputStreamOperator<Tuple2<T0, T1>> projectTuple2() {
		TypeInformation<?>[] fTypes = extractFieldTypes(fieldIndexes, dataStream.getType());
		TupleTypeInfo<Tuple2<T0, T1>> tType = new TupleTypeInfo<Tuple2<T0, T1>>(fTypes);

		return dataStream.transform("Projection", tType, new StreamProject<IN, Tuple2<T0, T1>>(fieldIndexes, tType.createSerializer(dataStream.getExecutionConfig())));
	}
803954
public static InputStream getBoundedStream(final InputStream stream, final int from, final int to)
            throws IOException {
        final long skipped = stream.skip(from);
        LOGGER.debug("Skipped {} bytes", skipped);
        return new BoundedInputStream(stream, (long) to - from);
    }
471531
public static RubyRange<Double> range(double start, double end) {
    String startStr = String.valueOf(start);
    String endStr = String.valueOf(end);
    int startPrecision = startStr.length() - startStr.lastIndexOf('.') - 1;
    int endPrecision = endStr.length() - endStr.lastIndexOf('.') - 1;
    return new RubyRange<>(
        new DoubleSuccessor(Math.max(startPrecision, endPrecision)), start, end,
        Interval.CLOSED);
  }
1180877
public static long max(LongTuple t)
    {
        return LongTupleFunctions.reduce(
            t, Long.MIN_VALUE, Math::max);
    }
1302499
public static <T> Stream<T> breadthFirst(TreeDef<T> treeDef, T node) {
		return StreamSupport.stream(TreeIterable.breadthFirst(treeDef, node).spliterator(), false);
	}