org.chromattic.common.collection
Class ElementInsertion<E>

java.lang.Object
  extended by org.chromattic.common.collection.ElementInsertion<E>
Direct Known Subclasses:
ElementInsertion.First, ElementInsertion.Last, ElementInsertion.Middle, ElementInsertion.Singleton

public abstract class ElementInsertion<E>
extends java.lang.Object

An object that indicates the insertion of an element in a list.

Version:
$Revision$
Author:
Julien Viet

Nested Class Summary
static class ElementInsertion.First<E>
           
static class ElementInsertion.Last<E>
           
static class ElementInsertion.Middle<E>
           
static class ElementInsertion.Singleton<E>
           
 
Field Summary
protected  E element
          .
 
Method Summary
 E getElement()
          Returns the inserted element.
abstract  int getIndex()
          In case of a list addition the index indicates the value that would be returned by a call to the ListIterator.nextIndex() when the element is inserted in the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

element

protected final E element
.

Method Detail

getIndex

public abstract int getIndex()

In case of a list addition the index indicates the value that would be returned by a call to the ListIterator.nextIndex() when the element is inserted in the list.

Returns:
the index

getElement

public E getElement()

Returns the inserted element.

Returns:
the inserted element


Copyright © 2013 eXo Platform SAS. All Rights Reserved.