Class FileContentsObjectList


  • public class FileContentsObjectList
    extends java.lang.Object
    Title: FileContentsObjectList class Description: This class has been created with the purpose of handling the objects that get saved to files. Each object is represented by a FileContentsObjectWrapper instance and this class represents a collection of these instances. Copyright: Copyright (c) 2001 Company: MicroStrategy, Inc.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Constructor Detail

      • FileContentsObjectList

        public FileContentsObjectList()
        Class Constructor.
    • Method Detail

      • resetList

        public void resetList()
        Creates a pointer to the list contents and sets it to the first element on the list.
      • hasNext

        public boolean hasNext()
        Verifies if the list has another element after the one that it's currently being pointed at.
        Returns:
        True if there's another element on the list, otherwise it returns False
      • next

        public FileContentsObjectWrapper next()
        Returns the next FileContentsObjectWrapper element available on the collection. If no pointer has been defined yet, it creates it.
        Returns:
        a FileContentsObjectWrapper instance pointing to the next element in the list
      • remove

        public void remove​(int index)
                    throws WebAppException
        Removes the indicated element from this collection instance
        Parameters:
        index - int index value of the element to be removed from the list.
        Throws:
        WebAppException - if an error ocurrs while removing the requested element
      • remove

        public void remove()
        Removes the collection element that it's currently pointed at.
      • remove

        public boolean remove​(FileContentsObjectWrapper oldObject)
        Searches for the object sent as parameter and removes its first instance from this collection. The object to delete needs to be one of the actual elements of this list.
        Parameters:
        oldObject - FileContentsObjectWrapper list instance to be searched for and removed from the collection.
        Returns:
        True if there was an element being removed, otherwise returns False.
      • get

        public FileContentsObjectList get​(java.lang.String key)
        Analyzes all the list searching for objects with the specified key and returns a new collection with the elements found.
        Parameters:
        key - String value of the key to search for
        Returns:
        A FileContentsObjectList> collection with the elements found with the specified key.
      • indexOf

        public int indexOf​(FileContentsObjectWrapper obj)
        Searches for the requested object and returns its position on this collection. The object to search needs to be one of the objects of this list.
        Parameters:
        obj - The FileContentsObjectWrapper instance to search on the collection
        Returns:
        the index where the requested object is found in the collection
      • set

        public void set​(int index,
                        FileContentsObjectWrapper obj)
                 throws WebAppException
        Modifies the indicated element of this collection with the object sent as parameter. The object to search and replace needs to be one of the objects of this list.
        Parameters:
        index - Index indicating the position of the element to be modified.
        obj - FileContentsObjectWrapper instance to replace the old element.
        Throws:
        WebAppException - if an error ocurrs while setting the object
      • size

        public int size()
        Returns the number of elements on this list.
        Returns:
        the size of the collection.