sk.uniba.euromath.document.schema
Class InsertList

java.lang.Object
  extended by sk.uniba.euromath.document.schema.InsertList
All Implemented Interfaces:
Iterable<ElementLoc>, Collection<ElementLoc>, List<ElementLoc>

public final class InsertList
extends Object
implements List<ElementLoc>

List of ElementLoc objects, must be maintained ordered by InsertPoint.

Author:
Martin Vysny

Method Summary
 boolean add(ElementLoc o)
           
 void add(int index, ElementLoc element)
           
 boolean addAll(Collection<? extends ElementLoc> c)
           
 boolean addAll(int index, Collection<? extends ElementLoc> c)
           
 boolean canCreate(QName qname, sk.baka.ikslibs.ptr.DOMPoint ip)
          Checks if this insertlist is able to create element/attribute with given qname.
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object o)
           
 ElementLoc get(int index)
           
 ElementLoc getFirstAt(sk.baka.ikslibs.ptr.DOMPoint ip, QName qname)
          Finds first elementloc bound to be inserted at given position.
 INameList<NewElementRule> getFirstNamelistAt(sk.baka.ikslibs.ptr.DOMPoint ip)
          Returns namelist of first elementloc, located at given insertpoint.
 int hashCode()
           
 int indexOf(Object o)
           
 boolean isEmpty()
           
 Iterator<ElementLoc> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<ElementLoc> listIterator()
           
 ListIterator<ElementLoc> listIterator(int index)
           
 ElementLoc remove(int index)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 ElementLoc set(int index, ElementLoc element)
           
 int size()
           
 List<ElementLoc> subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public String toString()
Overrides:
toString in class Object

add

public void add(int index,
                ElementLoc element)
Specified by:
add in interface List<ElementLoc>

add

public boolean add(ElementLoc o)
Specified by:
add in interface Collection<ElementLoc>
Specified by:
add in interface List<ElementLoc>

addAll

public boolean addAll(int index,
                      Collection<? extends ElementLoc> c)
Specified by:
addAll in interface List<ElementLoc>

addAll

public boolean addAll(Collection<? extends ElementLoc> c)
Specified by:
addAll in interface Collection<ElementLoc>
Specified by:
addAll in interface List<ElementLoc>

clear

public void clear()
Specified by:
clear in interface Collection<ElementLoc>
Specified by:
clear in interface List<ElementLoc>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<ElementLoc>
Specified by:
contains in interface List<ElementLoc>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<ElementLoc>
Specified by:
containsAll in interface List<ElementLoc>

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<ElementLoc>
Specified by:
equals in interface List<ElementLoc>
Overrides:
equals in class Object

get

public ElementLoc get(int index)
Specified by:
get in interface List<ElementLoc>

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<ElementLoc>
Specified by:
hashCode in interface List<ElementLoc>
Overrides:
hashCode in class Object

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List<ElementLoc>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<ElementLoc>
Specified by:
isEmpty in interface List<ElementLoc>

iterator

public Iterator<ElementLoc> iterator()
Specified by:
iterator in interface Iterable<ElementLoc>
Specified by:
iterator in interface Collection<ElementLoc>
Specified by:
iterator in interface List<ElementLoc>

lastIndexOf

public int lastIndexOf(Object o)
Specified by:
lastIndexOf in interface List<ElementLoc>

listIterator

public ListIterator<ElementLoc> listIterator()
Specified by:
listIterator in interface List<ElementLoc>

listIterator

public ListIterator<ElementLoc> listIterator(int index)
Specified by:
listIterator in interface List<ElementLoc>

remove

public ElementLoc remove(int index)
Specified by:
remove in interface List<ElementLoc>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<ElementLoc>
Specified by:
remove in interface List<ElementLoc>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<ElementLoc>
Specified by:
removeAll in interface List<ElementLoc>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<ElementLoc>
Specified by:
retainAll in interface List<ElementLoc>

set

public ElementLoc set(int index,
                      ElementLoc element)
Specified by:
set in interface List<ElementLoc>

size

public int size()
Specified by:
size in interface Collection<ElementLoc>
Specified by:
size in interface List<ElementLoc>

subList

public List<ElementLoc> subList(int fromIndex,
                                int toIndex)
Specified by:
subList in interface List<ElementLoc>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<ElementLoc>
Specified by:
toArray in interface List<ElementLoc>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<ElementLoc>
Specified by:
toArray in interface List<ElementLoc>

canCreate

public boolean canCreate(QName qname,
                         sk.baka.ikslibs.ptr.DOMPoint ip)
Checks if this insertlist is able to create element/attribute with given qname.

Parameters:
qname - qname to check. May be null - in such case the qname does not matter.
ip - the insertpoint where the element will be inserted.
Returns:
true if at least one elementloc contains rule for given qname. If qname is null then returns true if any elementloc can be found at given insertpoint.

getFirstAt

public ElementLoc getFirstAt(sk.baka.ikslibs.ptr.DOMPoint ip,
                             QName qname)
Finds first elementloc bound to be inserted at given position.

Parameters:
ip - the position.
qname - if not null then the elementloc must contain rule for given qname.
Returns:
elementloc instance or null if no such object exist.

getFirstNamelistAt

public INameList<NewElementRule> getFirstNamelistAt(sk.baka.ikslibs.ptr.DOMPoint ip)
Returns namelist of first elementloc, located at given insertpoint.

Parameters:
ip - insertpoint.
Returns:
namelist or null if no rule exists for given insertpoint.


Copyright © 2003-2006 null. All Rights Reserved.