Jiffie: Java InterFace For Internet Explorer

net.sf.jiffie
Class MultipleElementList

Package class diagram package MultipleElementList
java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<IDispatch>
          extended by net.sf.jiffie.MultipleElementList
All Implemented Interfaces:
java.lang.Iterable<IDispatch>, java.util.Collection<IDispatch>, java.util.List<IDispatch>, ElementList, Releaseable

public final class MultipleElementList
extends java.util.AbstractList<IDispatch>
implements ElementList

This class represents a collection of IHTMLElements. This is in effect a thin wrapper around an underlying IHTMLElementCollection instance.


Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
MultipleElementList(InternetExplorer parentBrowser, Dispatch dispatch)
          Constructor.
 
Method Summary
 IDispatch get(int index)
          
 boolean isReleased()
          This method returns a boolean flag indicating if this object has already been released.
 IDispatch item(int index)
          This is a convenience method designed to emulate the behaviour of the item method of the IHTMLElementCollection interface.
 ElementList item(java.lang.String name)
          This is a convenience method designed to emulate the behaviour of the item method of the IHTMLElementCollection interface.
 void release()
          This method releases the COM object associated with this collection.
 int size()
          
 ElementList tags(java.lang.String name)
          This is a convenience method designed to emulate the behaviour of the tags method of the IHTMLElementCollection interface.
 
Methods inherited from class java.util.AbstractList
add, 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, remove, 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.List
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray
 

Constructor Detail

MultipleElementList

public MultipleElementList(InternetExplorer parentBrowser,
                           Dispatch dispatch)
Constructor.

Parameters:
parentBrowser - parent browser
dispatch - Jacob dispatch interface
Method Detail

get

public IDispatch get(int index)

Specified by:
get in interface java.util.List<IDispatch>
Specified by:
get in class java.util.AbstractList<IDispatch>

size

public int size()

Specified by:
size in interface java.util.Collection<IDispatch>
Specified by:
size in interface java.util.List<IDispatch>
Specified by:
size in class java.util.AbstractCollection<IDispatch>

item

public IDispatch item(int index)
               throws JiffieException
This is a convenience method designed to emulate the behaviour of the item method of the IHTMLElementCollection interface.

Specified by:
item in interface ElementList
Parameters:
index - zero based array index
Returns:
object at this index in the collection
Throws:
JiffieException - if there is an error creating list

item

public ElementList item(java.lang.String name)
                 throws JiffieException
This is a convenience method designed to emulate the behaviour of the item method of the IHTMLElementCollection interface.

Specified by:
item in interface ElementList
Parameters:
name - name or id attribute of a tag
Returns:
list of tags with id or name attributes matching the supplied value
Throws:
JiffieException - if there is an error creating list

tags

public ElementList tags(java.lang.String name)
                 throws JiffieException
This is a convenience method designed to emulate the behaviour of the tags method of the IHTMLElementCollection interface.

Specified by:
tags in interface ElementList
Parameters:
name - tag type name
Returns:
list of tags whose tage type matches the supplied value
Throws:
JiffieException - if there is an error creating list

release

public void release()
This method releases the COM object associated with this collection.

Specified by:
release in interface Releaseable

isReleased

public boolean isReleased()
This method returns a boolean flag indicating if this object has already been released.

Specified by:
isReleased in interface Releaseable
Returns:
boolean flag


Copyright © 2004-2009 Packwood Software. All Rights Reserved.