public class EmptyRange 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.
Modifiers | Name | Description |
---|---|---|
protected Comparable |
at |
The value at which the range originates (may be null ). |
Constructor and description |
---|
EmptyRange
(Comparable at) Creates a new EmptyRange. |
Type | Name and description |
---|---|
boolean |
add(Object o) Always throws UnsupportedOperationException for an empty range. |
boolean |
addAll(int index, Collection c) Always throws UnsupportedOperationException for an empty range. |
boolean |
addAll(Collection c) Always throws UnsupportedOperationException for an empty range. |
boolean |
containsWithinBounds(Object o) Never true for an empty range. |
Object |
get(int index) Always throws IndexOutOfBoundsException for an empty range. |
Comparable |
getFrom() {@inheritDoc} |
Comparable |
getTo() {@inheritDoc} |
String |
inspect() {@inheritDoc} |
boolean |
isReverse() Never true for an empty range. |
boolean |
remove(Object o) Always throws UnsupportedOperationException for an empty range. |
Object |
remove(int index) Always throws UnsupportedOperationException for an empty range. |
boolean |
removeAll(Collection c) Always throws UnsupportedOperationException for an empty range. |
boolean |
retainAll(Collection c) Always throws UnsupportedOperationException for an empty range. |
Object |
set(int index, Object element) Always throws UnsupportedOperationException for an empty range. |
int |
size() Always 0 for an empty range. |
void |
step(int step, Closure closure) Always does nothing for an empty range. |
List |
step(int step) Always returns an empty list for an empty range. |
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 |
The value at which the range originates (may be null
).
Creates a new EmptyRange.
at
- the value at which the range starts (may be null
). Always throws UnsupportedOperationException
for an empty range.
Always throws UnsupportedOperationException
for an empty range.
Always throws UnsupportedOperationException
for an empty range.
Never true for an empty range.
false
Always throws IndexOutOfBoundsException
for an empty range.
{@inheritDoc}
{@inheritDoc}
{@inheritDoc}
Never true for an empty range.
false
Always throws UnsupportedOperationException
for an empty range.
Always throws UnsupportedOperationException
for an empty range.
Always throws UnsupportedOperationException
for an empty range.
Always throws UnsupportedOperationException
for an empty range.
Always throws UnsupportedOperationException
for an empty range.
Always 0 for an empty range.
Always does nothing for an empty range.
Always returns an empty list for an empty range.
{@inheritDoc}
Copyright © 2003-2015 The Apache Software Foundation. All rights reserved.