Package ubic.gemma.persistence.util
Class Slice<O>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<O>
-
- ubic.gemma.persistence.util.Slice<O>
-
- All Implemented Interfaces:
Iterable<O>
,Collection<O>
,List<O>
public class Slice<O> extends AbstractList<O> implements List<O>
Represents a slice ofList
.
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
add(O elem)
Deprecated.O
get(int i)
Integer
getLimit()
Integer
getOffset()
Sort
getSort()
Long
getTotalElements()
<S> Slice<S>
map(Function<? super O,? extends S> converter)
boolean
remove(Object elem)
Deprecated.int
size()
-
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from interface java.util.List
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArray
-
-
-
-
Method Detail
-
get
public O get(int i)
-
size
public int size()
- Specified by:
size
in interfaceCollection<O>
- Specified by:
size
in interfaceList<O>
- Specified by:
size
in classAbstractCollection<O>
-
add
@Deprecated public boolean add(O elem)
Deprecated.This is unfortunately necessary because it it blindly casted. This is necessary- Specified by:
add
in interfaceCollection<O>
- Specified by:
add
in interfaceList<O>
- Overrides:
add
in classAbstractList<O>
-
remove
@Deprecated public boolean remove(Object elem)
Deprecated.Unfortunately, we need to implement this because gsec explicitly remove items that are not accessible by the current user ingemma.gsec.acl.afterinvocation.AclAfterFilterValueObjectCollectionProvider
.- Specified by:
remove
in interfaceCollection<O>
- Specified by:
remove
in interfaceList<O>
- Overrides:
remove
in classAbstractCollection<O>
-
getTotalElements
@Nullable public Long getTotalElements()
- Returns:
- the total number of elements, or null if unspecified.
-
-