Tabnine Logo
com.oath.cyclops.internal.stream.spliterators.ints
Code IndexAdd Tabnine to your IDE (free)

How to use com.oath.cyclops.internal.stream.spliterators.ints

Best Java code snippets using com.oath.cyclops.internal.stream.spliterators.ints (Showing top 20 results out of 315)

origin: aol/cyclops

private int calcIndex() {
  if(isReverse()) {
    return max - 1;
  }else{
    return start;
  }
}
origin: aol/cyclops

@Override
public ReversingIntArraySpliterator<Integer> invert() {
  setReverse(!isReverse());
  index = calcIndex();
  return this;
}
origin: aol/cyclops

@Override
public ReversableSpliterator copy() {
  return new ReversingRangeIntSpliterator(
      min, max, step,reverse,start);
}
origin: aol/cyclops

@Override
public ReversableSpliterator<java.lang.Integer> copy() {
  return new ReversingIntArraySpliterator<>(
      array, start,max,reverse);
}
origin: aol/cyclops

public ReversingIntArraySpliterator(int[] array, int start, int max, boolean reverse) {
  this.array = array;
  this.reverse=reverse;
  this.max = Math.min(array.length,max);
  this.start= Math.max(0,start);
  this.index = calcIndex();
}
origin: com.oath.cyclops/cyclops

@Override
public ReversingIntArraySpliterator<Integer> invert() {
  setReverse(!isReverse());
  index = calcIndex();
  return this;
}
origin: aol/cyclops

@Override
public ReversableSpliterator invert() {
  return new ReversingRangeIntSpliterator(min,max,step,!reverse);
}
origin: aol/cyclops

/**
 * @param values ints to populate Stream from
 * @return ReactiveSeq of multiple Integers
 */
public static ReactiveSeq<Integer> ofInts(int... values){
  return fromSpliterator(new ReversingIntArraySpliterator<>(values,0,values.length,false));
}
/*
origin: com.oath.cyclops/cyclops

private int calcIndex() {
  if(isReverse()) {
    return max - 1;
  }else{
    return start;
  }
}
origin: com.oath.cyclops/cyclops

public ReversingIntArraySpliterator(int[] array, int start, int max, boolean reverse) {
  this.array = array;
  this.reverse=reverse;
  this.max = Math.min(array.length,max);
  this.start= Math.max(0,start);
  this.index = calcIndex();
}
origin: aol/cyclops

public static ReactiveSeq<Integer> range(final int start, final  int step,final int end) {
  if(start>end)
    return range(end,step,start);
  final ReversingRangeIntSpliterator range = new ReversingRangeIntSpliterator(
      start, end, step,false);
  return Streams.reactiveSeq(range, Optional.ofNullable(range));
}
public static ReactiveSeq<Long> rangeLong(final long start, final  long step,final long end) {
origin: aol/cyclops

/**
 * @param values ints to populate Stream from
 * @return ReactiveSeq of multiple Integers
 */
public static ReactiveSeq<Integer> ofInts(int... values){
  return ReactiveSeq.fromSpliterator(new ReversingIntArraySpliterator<>(values,0,values.length,false));
}
/*
origin: aol/cyclops

/**
 * Create an efficiently reversable Sequence that produces the integers
 * between skip and take
 *
 * @param start
 *            Number of range to skip from
 * @param end
 *            Number for range to take at
 * @return Range ReactiveSeq
 */
public static ReactiveSeq<Integer> range(final int start, final int end) {
  if(start>end)
    return range(end,start);
  final ReversingRangeIntSpliterator range = new ReversingRangeIntSpliterator(
                                        start, end, 1,false);
  return Streams.reactiveSeq(range, Optional.ofNullable(range));
}
public static ReactiveSeq<Integer> range(final int start, final  int step,final int end) {
origin: com.oath.cyclops/cyclops

@Override
public ReversableSpliterator<java.lang.Integer> copy() {
  return new ReversingIntArraySpliterator<>(
      array, start,max,reverse);
}
origin: com.oath.cyclops/cyclops

@Override
public ReversableSpliterator copy() {
  return new ReversingRangeIntSpliterator(
      min, max, step,reverse,start);
}
origin: com.oath.cyclops/cyclops

/**
 * @param values ints to populate Stream from
 * @return ReactiveSeq of multiple Integers
 */
public static ReactiveSeq<Integer> ofInts(int... values){
  return ReactiveSeq.fromSpliterator(new ReversingIntArraySpliterator<>(values,0,values.length,false));
}
/*
origin: com.oath.cyclops/cyclops

@Override
public ReversableSpliterator invert() {
  return new ReversingRangeIntSpliterator(min,max,step,!reverse);
}
origin: com.oath.cyclops/cyclops

/**
 * @param values ints to populate Stream from
 * @return ReactiveSeq of multiple Integers
 */
public static ReactiveSeq<Integer> ofInts(int... values){
  return fromSpliterator(new ReversingIntArraySpliterator<>(values,0,values.length,false));
}
/*
origin: com.oath.cyclops/cyclops

public static ReactiveSeq<Integer> range(final int start, final  int step,final int end) {
  if(start>end)
    return range(end,step,start);
  final ReversingRangeIntSpliterator range = new ReversingRangeIntSpliterator(
      start, end, step,false);
  return Streams.reactiveSeq(range, Optional.ofNullable(range));
}
public static ReactiveSeq<Long> rangeLong(final long start, final  long step,final long end) {
origin: com.oath.cyclops/cyclops

/**
 * Create an efficiently reversable Sequence that produces the integers
 * between skip and take
 *
 * @param start
 *            Number of range to skip from
 * @param end
 *            Number for range to take at
 * @return Range ReactiveSeq
 */
public static ReactiveSeq<Integer> range(final int start, final int end) {
  if(start>end)
    return range(end,start);
  final ReversingRangeIntSpliterator range = new ReversingRangeIntSpliterator(
                                        start, end, 1,false);
  return Streams.reactiveSeq(range, Optional.ofNullable(range));
}
public static ReactiveSeq<Integer> range(final int start, final  int step,final int end) {
com.oath.cyclops.internal.stream.spliterators.ints

Most used classes

  • ReversingIntArraySpliterator
  • ReversingRangeIntSpliterator
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now