com.liferay.portal.kernel.util
Class TranslatedList<E,F>

java.lang.Object
  extended by com.liferay.portal.kernel.util.ListWrapper<E>
      extended by com.liferay.portal.kernel.util.TranslatedList<E,F>
All Implemented Interfaces:
java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>

public abstract class TranslatedList<E,F>
extends ListWrapper<E>

View Source

Author:
Brian Wing Shun Chan

Constructor Summary
TranslatedList(java.util.List<E> newList, java.util.List<F> oldList)
           
 
Method Summary
 boolean add(E o)
           
 void add(int index, E element)
           
 boolean addAll(java.util.Collection<? extends E> c)
           
 boolean addAll(int index, java.util.Collection<? extends E> c)
           
protected abstract  TranslatedList<E,F> newInstance(java.util.List<E> newList, java.util.List<F> oldList)
           
 E remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 boolean retainAll(java.util.Collection<?> c)
           
 E set(int index, E element)
           
 java.util.List<E> subList(int fromIndex, int toIndex)
           
protected abstract  F toOldObject(E o)
           
 
Methods inherited from class com.liferay.portal.kernel.util.ListWrapper
clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, size, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

TranslatedList

public TranslatedList(java.util.List<E> newList,
                      java.util.List<F> oldList)
Method Detail

add

public boolean add(E o)
Specified by:
add in interface java.util.Collection<E>
Specified by:
add in interface java.util.List<E>
Overrides:
add in class ListWrapper<E>

add

public void add(int index,
                E element)
Specified by:
add in interface java.util.List<E>
Overrides:
add in class ListWrapper<E>

addAll

public boolean addAll(java.util.Collection<? extends E> c)
Specified by:
addAll in interface java.util.Collection<E>
Specified by:
addAll in interface java.util.List<E>
Overrides:
addAll in class ListWrapper<E>

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends E> c)
Specified by:
addAll in interface java.util.List<E>
Overrides:
addAll in class ListWrapper<E>

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<E>
Specified by:
remove in interface java.util.List<E>
Overrides:
remove in class ListWrapper<E>

remove

public E remove(int index)
Specified by:
remove in interface java.util.List<E>
Overrides:
remove in class ListWrapper<E>

removeAll

public boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<E>
Specified by:
removeAll in interface java.util.List<E>
Overrides:
removeAll in class ListWrapper<E>

retainAll

public boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<E>
Specified by:
retainAll in interface java.util.List<E>
Overrides:
retainAll in class ListWrapper<E>

set

public E set(int index,
             E element)
Specified by:
set in interface java.util.List<E>
Overrides:
set in class ListWrapper<E>

subList

public java.util.List<E> subList(int fromIndex,
                                 int toIndex)
Specified by:
subList in interface java.util.List<E>
Overrides:
subList in class ListWrapper<E>

newInstance

protected abstract TranslatedList<E,F> newInstance(java.util.List<E> newList,
                                                   java.util.List<F> oldList)

toOldObject

protected abstract F toOldObject(E o)