public class ObjectRange extends AbstractList
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Constructor and description |
---|
ObjectRange
(Comparable from, Comparable to) Creates a new ObjectRange. |
ObjectRange
(Comparable from, Comparable to, boolean reverse) |
Type | Name and description |
---|---|
boolean |
contains(Object value) |
boolean |
containsWithinBounds(Object value) Checks whether a value is between the from and to values of a Range |
protected Object |
decrement(Object value) Decrements by one |
boolean |
equals(Object that) {@inheritDoc} |
boolean |
equals(ObjectRange that) Compares an ObjectRange to another ObjectRange. |
Object |
get(int index) {@inheritDoc} |
Comparable |
getFrom() {@inheritDoc} |
Comparable |
getTo() {@inheritDoc} |
protected Object |
increment(Object value) Increments by one |
String |
inspect() {@inheritDoc} |
boolean |
isReverse() {@inheritDoc} |
Iterator |
iterator() {@inheritDoc} |
int |
size() {@inheritDoc} |
void |
step(int step, Closure closure) {@inheritDoc} |
List |
step(int step) {@inheritDoc} |
List |
subList(int fromIndex, int toIndex) {@inheritDoc} |
String |
toString() {@inheritDoc} |
Methods inherited from class | Name |
---|---|
class AbstractList |
add, add, remove, get, equals, hashCode, indexOf, clear, lastIndexOf, subList, addAll, iterator, set, listIterator, listIterator, remove, toString, contains, isEmpty, size, toArray, toArray, addAll, containsAll, removeAll, retainAll, wait, wait, wait, getClass, notify, notifyAll, size |
class AbstractCollection |
add, remove, toString, clear, contains, isEmpty, size, toArray, toArray, addAll, iterator, containsAll, removeAll, retainAll, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
Creates a new ObjectRange. Creates a reversed range if
from
< to
.
from
- the first value in the range.to
- the last value in the range.Checks whether a value is between the from and to values of a Range
value
- the value of interestDecrements by one
value
- the value to decrement{@inheritDoc}
Compares an ObjectRange to another ObjectRange.
that
- the object to check equality withtrue
if the ranges are equal{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
Increments by one
value
- the value to increment{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
Copyright © 2003-2015 The Apache Software Foundation. All rights reserved.