org.kuali.rice.krad.lookup
Class CollectionIncomplete<T>

java.lang.Object
  extended by org.kuali.rice.krad.lookup.CollectionIncomplete<T>
Type Parameters:
T - The type that the collection stores internally
All Implemented Interfaces:
Serializable, Iterable<T>, Collection<T>, List<T>, RandomAccess

public class CollectionIncomplete<T>
extends Object
implements List<T>, RandomAccess, Serializable

A Collection that may be truncated

See Also:
Serialized Form

Constructor Summary
CollectionIncomplete(Collection<T> collection, Long actualSizeIfTruncated)
          Collection that may be incomplete/truncated
 
Method Summary
 void add(int arg0, T arg1)
           
 boolean add(T arg0)
           
 boolean addAll(Collection<? extends T> arg0)
           
 boolean addAll(int arg0, Collection<? extends T> arg1)
           
 void clear()
           
 boolean contains(Object arg0)
           
 boolean containsAll(Collection<?> arg0)
           
 boolean equals(Object arg0)
           
 T get(int arg0)
           
 Long getActualSizeIfTruncated()
          Get the actual collection size if the collection was truncated
 int hashCode()
           
 int indexOf(Object arg0)
           
 boolean isEmpty()
           
 Iterator<T> iterator()
           
 int lastIndexOf(Object arg0)
           
 ListIterator<T> listIterator()
           
 ListIterator listIterator(int arg0)
           
 T remove(int arg0)
           
 boolean remove(Object arg0)
           
 boolean removeAll(Collection<?> arg0)
           
 boolean retainAll(Collection<?> arg0)
           
 T set(int arg0, T arg1)
           
 void setActualSizeIfTruncated(Long actualSizeIfTruncated)
          Set the actual collection size if the collection was truncated
 int size()
           
 List<T> subList(int arg0, int arg1)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] arg0)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionIncomplete

public CollectionIncomplete(Collection<T> collection,
                            Long actualSizeIfTruncated)
Collection that may be incomplete/truncated

Parameters:
collection -
actualSizeIfTruncated - the actual collection size before truncation. Zero if the collection is not truncated.
Method Detail

add

public void add(int arg0,
                T arg1)
Specified by:
add in interface List<T>
See Also:
List.add(int, Object)

add

public boolean add(T arg0)
Specified by:
add in interface Collection<T>
Specified by:
add in interface List<T>
See Also:
List.add(Object)

addAll

public boolean addAll(int arg0,
                      Collection<? extends T> arg1)
Specified by:
addAll in interface List<T>
See Also:
List.addAll(int, java.util.Collection)

addAll

public boolean addAll(Collection<? extends T> arg0)
Specified by:
addAll in interface Collection<T>
Specified by:
addAll in interface List<T>
See Also:
List.addAll(java.util.Collection)

clear

public void clear()
Specified by:
clear in interface Collection<T>
Specified by:
clear in interface List<T>
See Also:
List.clear()

contains

public boolean contains(Object arg0)
Specified by:
contains in interface Collection<T>
Specified by:
contains in interface List<T>
See Also:
List.contains(Object)

containsAll

public boolean containsAll(Collection<?> arg0)
Specified by:
containsAll in interface Collection<T>
Specified by:
containsAll in interface List<T>
See Also:
List.containsAll(java.util.Collection)

equals

public boolean equals(Object arg0)
Specified by:
equals in interface Collection<T>
Specified by:
equals in interface List<T>
Overrides:
equals in class Object
See Also:
List.equals(Object)

get

public T get(int arg0)
Specified by:
get in interface List<T>
See Also:
List.get(int)

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<T>
Specified by:
hashCode in interface List<T>
Overrides:
hashCode in class Object
See Also:
List.hashCode()

indexOf

public int indexOf(Object arg0)
Specified by:
indexOf in interface List<T>
See Also:
List.indexOf(Object)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<T>
Specified by:
isEmpty in interface List<T>
See Also:
List.isEmpty()

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>
Specified by:
iterator in interface Collection<T>
Specified by:
iterator in interface List<T>
See Also:
List.iterator()

lastIndexOf

public int lastIndexOf(Object arg0)
Specified by:
lastIndexOf in interface List<T>
See Also:
List.lastIndexOf(Object)

listIterator

public ListIterator<T> listIterator()
Specified by:
listIterator in interface List<T>
See Also:
List.listIterator()

listIterator

public ListIterator listIterator(int arg0)
Specified by:
listIterator in interface List<T>
See Also:
List.listIterator(int)

remove

public T remove(int arg0)
Specified by:
remove in interface List<T>
See Also:
List.remove(int)

remove

public boolean remove(Object arg0)
Specified by:
remove in interface Collection<T>
Specified by:
remove in interface List<T>
See Also:
List.remove(Object)

removeAll

public boolean removeAll(Collection<?> arg0)
Specified by:
removeAll in interface Collection<T>
Specified by:
removeAll in interface List<T>
See Also:
List.removeAll(java.util.Collection)

retainAll

public boolean retainAll(Collection<?> arg0)
Specified by:
retainAll in interface Collection<T>
Specified by:
retainAll in interface List<T>
See Also:
List.retainAll(java.util.Collection)

set

public T set(int arg0,
             T arg1)
Specified by:
set in interface List<T>
See Also:
List.set(int, Object)

size

public int size()
Specified by:
size in interface Collection<T>
Specified by:
size in interface List<T>
See Also:
List.size()

subList

public List<T> subList(int arg0,
                       int arg1)
Specified by:
subList in interface List<T>
See Also:
List.subList(int, int)

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<T>
Specified by:
toArray in interface List<T>
See Also:
List.toArray()

toArray

public <T> T[] toArray(T[] arg0)
Specified by:
toArray in interface Collection<T>
Specified by:
toArray in interface List<T>
See Also:
List.toArray(Object[])

toString

public String toString()
Overrides:
toString in class Object
See Also:
java.util.List#toString()

getActualSizeIfTruncated

public Long getActualSizeIfTruncated()
Get the actual collection size if the collection was truncated

For non-truncated collection the getActualSizeIfTruncated is zero.

Returns:
Returns the actualSizeIfTruncated.

setActualSizeIfTruncated

public void setActualSizeIfTruncated(Long actualSizeIfTruncated)
Set the actual collection size if the collection was truncated

Parameters:
actualSizeIfTruncated - The actualSizeIfTruncated to set.


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.