public class Range<K extends Comparable<?>> extends Object implements Serializable, Cloneable
| 修飾子とタイプ | フィールドと説明 |
|---|---|
K |
from |
boolean |
fromInclusive |
protected static KeyComparator |
keyComp |
K |
to |
boolean |
toInclusive |
| 修飾子 | コンストラクタと説明 |
|---|---|
protected |
Range(boolean checkArgs,
K from,
boolean fromInclusive,
K to,
boolean toInclusive)
サブクラス(具体的には、CircularRangeのような拡張)のために、引数のチェックを選択できる
|
|
Range(char fromEdgeSpec,
K from,
K to,
char toEdgeSpec)
constructor to allow the form like Range('[', 10, 20, ')');
|
|
Range(K key) |
|
Range(K from,
boolean fromInclusive,
K to,
boolean toInclusive) |
|
Range(K from,
K to) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
Range<K> |
clone() |
boolean |
contains(Comparable<?> key)
Returns true if a key is within this Range.
|
boolean |
contains(Range<K> another)
check if another range is fully-contained in this range.
|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isSameRange(Range<K> another) |
boolean |
isSingleton() |
boolean |
isWhole() |
String |
rangeString() |
Range<K>[] |
split(K k) |
String |
toString() |
String |
toString2() |
protected static final KeyComparator keyComp
public final K extends Comparable<?> from
public final K extends Comparable<?> to
public final boolean fromInclusive
public final boolean toInclusive
public Range(K key)
protected Range(boolean checkArgs,
K from,
boolean fromInclusive,
K to,
boolean toInclusive)
checkArgs - if true, check the validation of argumentsfrom - low endpointfromInclusive - true if the low endpoint is to be included in the Rangeto - high endpointtoInclusive - true if the high endpoint is to be included in the Rangepublic Range(char fromEdgeSpec,
K from,
K to,
char toEdgeSpec)
fromEdgeSpec - the lower-side edge specifier of rangefrom - lower value of the range.to - upper value of the range.toEdgeSpec - the upper-side edge specifier of rangepublic boolean isSingleton()
public boolean isWhole()
public boolean contains(Comparable<?> key)
Comparable wildcard type key is specified.
key - the target key.public boolean contains(Range<K> another)
another - another rangepublic String toString2()
public String rangeString()
Copyright © 2017. All rights reserved.