XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class FragmentListImpl<F extends Fragment>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<F>
              extended by org.xbrlapi.impl.FragmentListImpl<F>
All Implemented Interfaces:
Serializable, Cloneable, Iterable<F>, Collection<F>, List<F>, RandomAccess, FragmentList<F>

public class FragmentListImpl<F extends Fragment>
extends ArrayList<F>
implements FragmentList<F>

Author:
Geoffrey Shuetrim (geoff@galexy.net)
See Also:
Serialized Form

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FragmentListImpl()
           
FragmentListImpl(F fragment)
           
 
Method Summary
 void addAll(FragmentList<F> fragmentList)
          Appends a list of fragments to this fragment list.
 void addFragment(F fragment)
          Adds a specified fragment to the end of the list of fragments.
 F getFragment(int index)
          Returns the indexth fragment in the collection.
 int getLength()
          Get length of the list of fragments.
 void removeFragment(F fragment)
          Removes a specified fragment from the list
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

FragmentListImpl

public FragmentListImpl()

FragmentListImpl

public FragmentListImpl(F fragment)
Parameters:
fragment - The fragment to include in the list of fragments.
Method Detail

getLength

public int getLength()
Get length of the list of fragments.

Specified by:
getLength in interface FragmentList<F extends Fragment>
Returns:
The length of the list of fragments.
See Also:
FragmentList.getLength()

getFragment

public F getFragment(int index)
Returns the indexth fragment in the collection. If index is greater than or equal to the number of fragments in the list, this returns null.

Specified by:
getFragment in interface FragmentList<F extends Fragment>
Parameters:
index - The index of the required fragment
Returns:
The fragment at the indexth position in the FragmentList, or null if that is not a valid index.
See Also:
FragmentList.getFragment(int)

removeFragment

public void removeFragment(F fragment)
                    throws XBRLException
Removes a specified fragment from the list

Specified by:
removeFragment in interface FragmentList<F extends Fragment>
Parameters:
fragment - The fragment to be removed
Throws:
XBRLException - if the fragment could not be removed.

addFragment

public void addFragment(F fragment)
                 throws XBRLException
Adds a specified fragment to the end of the list of fragments.

Specified by:
addFragment in interface FragmentList<F extends Fragment>
Throws:
XBRLException - if the fragment cannot be added to the list of fragments or if the fragment is null.

addAll

public void addAll(FragmentList<F> fragmentList)
            throws XBRLException
Appends a list of fragments to this fragment list.

Specified by:
addAll in interface FragmentList<F extends Fragment>
Parameters:
fragmentList - The list of fragments to append to this fragment list.
Throws:
XBRLException
See Also:
FragmentList.addAll(FragmentList)

SourceForge Logo