Creates a new NumberRange with the same <code>from</code> and <code>to</code> as this
IntRange but with a step size of <code>stepSize</code>.

@param stepSize the desired step size
@return a new NumberRange
@since 2.5.0
355439
public <T extends Number & Comparable> NumberRange by(T stepSize) {
        return new NumberRange(NumberRange.comparableNumber((Number)from), NumberRange.comparableNumber((Number)to), stepSize, inclusive);
    }
1124504
public static <K> NumberMap<K, Long> newLongMap() {
		return new NumberMap<K, Long>() {
			@Override
			public void add(K key, Long addend) {
				put(key, containsKey(key) ? (get(key) + addend) : addend);
			}
			@Override
			public void sub(K key, Long subtrahend) {
				put(key, (containsKey(key) ? get(key) : 0l) - subtrahend);
			}
		};
	}
1370406
@SuppressWarnings("unchecked")
    private Comparable increment(Object value, Number step) {
        return (Comparable) plus((Number) value, step);
    }
994378
public static <K> NumberMap<K, Double> newDoubleMap() {
		return new NumberMap<K, Double>() {
			@Override
			public void add(K key, Double addend) {
				put(key, containsKey(key) ? (get(key) + addend) : addend);
			}
			@Override
			public void sub(K key, Double subtrahend) {
				put(key, (containsKey(key) ? get(key) : 0d) - subtrahend);
			}
		};
	}
1316111
@Override
    public IntList copy(final int from, final int to, final int step) {
        checkFromToIndex(from < to ? from : (to == -1 ? 0 : to), from < to ? to : from);

        return new IntList(N.copyOfRange(elementData, from, to, step));
    }
647578
function createRange$1(fromRight) {
              return function(start, end, step) {
                if (step && typeof step != 'number' && isIterateeCall$1(start, end, step)) {
                  end = step = undefined;
                }
                // Ensure the sign of `-0` is preserved.
                start = toFinite$1(start);
                if (end === undefined) {
                  end = start;
                  start = 0;
                } else {
                  end = toFinite$1(end);
                }
                step = step === undefined ? (start < end ? 1 : -1) : toFinite$1(step);
                return baseRange$1(start, end, step, fromRight);
              };
            }
943461
public IVersionRange merge(IVersionRange... ranges) {
    if (ranges.length < 2) {
      return ranges[0];
    }

    // Check the type of the first range
    if (!(ranges[0] instanceof VersionRange)) {
      if (!(ranges[0] instanceof OrRange)) {
        throw new UnsupportedOperationException("Incorrect type for ranges[0]");
      }
      if (((OrRange) ranges[0]).size() != 2) {
        throw new UnsupportedOperationException("Incorrect size for ranges[0]");
      }
    }
    else {
      if (!((VersionRange) ranges[0]).isUnbounded()) {
        throw new UnsupportedOperationException("ranges[0] should be unbounded (> or >=)");
      }
    }

    int lastIndex = ranges.length - 1;

    // Check the type of the last range
    if (!(ranges[lastIndex] instanceof VersionRange)) {
      if (!(ranges[lastIndex] instanceof OrRange)) {
        throw new UnsupportedOperationException("Incorrect type for ranges[last]");
      }
      if (((OrRange) ranges[lastIndex]).size() != 2) {
        throw new UnsupportedOperationException("Incorrect size for ranges[last]");
      }
    }
    else {
      if (((VersionRange) ranges[lastIndex]).isUnbounded()) {
        throw new UnsupportedOperationException("ranges[0] should be bounded (< or <=)");
      }
    }

    // Check the rest of the types
    for (int i = 1; i < lastIndex; i++) {
      if (!(ranges[i] instanceof OrRange)) {
        throw new UnsupportedOperationException("Incorrect type for ranges[" + i + "]");
      }

      if (((OrRange) ranges[i]).size() != 2) {
        throw new UnsupportedOperationException("Incorrect size for ranges[" + i + "]");
      }
    }

    List<IVersionRange> results = new LinkedList<IVersionRange>();
    IVersionRange last = null;
    for (int i = 0; i < ranges.length; i++) {
      IVersionRange range = ranges[i];
      if (last == null) {
        if (range instanceof VersionRange) {
          last = range;
        }
        else {
          OrRange orange = (OrRange) range;
          results.add(orange.first());
          last = orange.last();
        }
      }
      else {
        if (range instanceof VersionRange) {
          AndRange arange = new AndRange(last, range);
          results.add(arange);
          last = null;
        }
        else {
          OrRange orange = (OrRange) range;
          AndRange arange = new AndRange(last, orange.first());
          results.add(arange);
          last = orange.last();
        }
      }
    }

    if (last != null) {
      results.add(last);
    }

    return new OrRange(results);
  }
1359144
@SuppressWarnings("rawtypes")
	public static <K extends Comparable, V> TreeRangeMap<K, V> createRangeMap() {
		return TreeRangeMap.create();
	}
1374361
public static <K> NumberMap<K, Integer> newIntegerMap() {
		return new NumberMap<K, Integer>() {
			@Override
			public void add(K key, Integer addend) {
				put(key, containsKey(key) ? (get(key) + addend) : addend);
			}
			@Override
			public void sub(K key, Integer subtrahend) {
				put(key, (containsKey(key) ? get(key) : 0) - subtrahend);
			}
		};
	}
972056
public static final Function<Number,BigDecimal> toBigDecimal(final int scale, final RoundingMode roundingMode) {
        return new ToBigDecimal(scale, roundingMode);
    }
638822
public IntegerRanges getRange(String name) {
    String valueString = get(name);
    Preconditions.checkNotNull(valueString);
    return new IntegerRanges(valueString);
  }
167542
public FileIndexBuilder appendNextRecord(long recordSize) {
        checkIfDestroyed();
        if (recordSize < 0)
            throw new IllegalArgumentException("Size cannot be negative.");
        if (currentRecord == step) {
            index.add(startingByte + currentByte);
            currentRecord = 0;
        }
        currentByte += recordSize;
        ++currentRecord;
        return this;
    }
99929
public void addNumberRangeFilter(String key, SizeRange sizeRange) {
        JsonObject opObj = new JsonObject();

        if (sizeRange.getLowerBoundBytes() != 0) {
            opObj.add("gt", sizeRange.getLowerBoundBytes());
        }
        if (sizeRange.getUpperBoundBytes() != 0) {
            opObj.add("lt", sizeRange.getUpperBoundBytes());
        }

        this.filtersList.add(key, opObj);
    }
494302
public static SinCosTable make(int steps) {
    if ((steps & 0x3) == 0) {
      return new QuarterTable(steps);
    }
    if ((steps & 0x1) == 0) {
      return new HalfTable(steps);
    }
    return new FullTable(steps);
  }
438477
public static CharRanges withRanges(int... ranges) {
    if ((ranges.length & 1) != 0) { throw new IllegalArgumentException(); }
    for (int i = 1; i < ranges.length; ++i) {
      if (ranges[i] <= ranges[i - 1]) {
        throw new IllegalArgumentException(ranges[i] + " > " + ranges[i - 1]);
      }
    }
    return new CharRanges(ranges);
  }
537413
public static <K> NumberMap<K, BigDecimal> newBigDecimalMap() {
		return new NumberMap<K, BigDecimal>() {
			@Override
			public void add(K key, BigDecimal addend) {
				put(key, containsKey(key) ? get(key).add(addend) : addend);
			}
			@Override
			public void sub(K key, BigDecimal subtrahend) {
				put(key, (containsKey(key) ? get(key) : BigDecimal.ZERO).subtract(subtrahend));
			}
		};
	}
627621
public static double Scale(DoubleRange from, DoubleRange to, int x) {
        if (from.length() == 0) return 0;
        return ((to.length()) * (x - from.getMin()) / from.length() + to.getMin());
    }