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 booleanadd(O elem)Deprecated.Oget(int i)IntegergetLimit()IntegergetOffset()SortgetSort()LonggetTotalElements()<S> Slice<S>map(Function<? super O,? extends S> converter)booleanremove(Object elem)Deprecated.intsize()-
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:
sizein interfaceCollection<O>- Specified by:
sizein interfaceList<O>- Specified by:
sizein classAbstractCollection<O>
-
add
@Deprecated public boolean add(O elem)
Deprecated.This is unfortunately necessary because it it blindly casted. This is necessary- Specified by:
addin interfaceCollection<O>- Specified by:
addin interfaceList<O>- Overrides:
addin 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:
removein interfaceCollection<O>- Specified by:
removein interfaceList<O>- Overrides:
removein classAbstractCollection<O>
-
getTotalElements
@Nullable public Long getTotalElements()
- Returns:
- the total number of elements, or null if unspecified.
-
-