public class IntRange extends Object implements INumberRange
IntRange class stores range of integers. Examples : "1-3", "2 .. 4", "123 ... 1000" (Important:
using of ".." and "..." requires spaces between numbers and separator).| Constructor and Description |
|---|
IntRange() |
IntRange(long number) |
IntRange(long min,
long max)
Constructor for
IntRange with provided min and max values. |
IntRange(String range)
Constructor for
IntRange. |
public IntRange(long min,
long max)
IntRange with provided min and max values.public IntRange(long number)
public IntRange()
public IntRange(String range)
IntRange. Tries to parse range text with variety of formats. Supported range
formats: "public boolean contains(IntValue value)
public boolean contains(LongValue value)
public boolean contains(long value)
public long getMax()
public long getMin()
public boolean containsNumber(Number n)
containsNumber in interface INumberRangepublic static RangeWithBounds getRangeWithBounds(String range)
public static IntRange cast(BigInteger x, IntRange y)
public static IntRange cast(BigDecimal x, IntRange y)
public static IntRange cast(ShortValue x, IntRange y)
public static IntRange cast(FloatValue x, IntRange y)
public static IntRange cast(DoubleValue x, IntRange y)
public static IntRange cast(BigIntegerValue x, IntRange y)
public static IntRange cast(BigDecimalValue x, IntRange y)
Copyright © 2004–2019 OpenL Tablets. All rights reserved.