psdi.iface.mic

Class ObjectList

  • java.lang.Object
    • psdi.iface.mic.ObjectList
  • All Implemented Interfaces:
    java.lang.Iterable, java.util.Collection, java.util.List
    Direct Known Subclasses:
    OslcJSONObjectList, OslcRDFObjectList


    public class ObjectList
    extends java.lang.Object
    implements java.util.List
    • Constructor Summary

      Constructors 
      Constructor and Description
      ObjectList()
      Default Constructor
      ObjectList(java.util.List c)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(int index, java.lang.Object element)
      Adds object to ObjectList for specific index
      boolean add(java.lang.Object o)
      Adds object to ObjectList at the end
      boolean addAll(java.util.Collection c)
      Adds collection to ObjectList at the end
      boolean addAll(int index, java.util.Collection c)
      Adds collection to ObjectList at the index specified
      void clear()
      Clears ObjectList object
      boolean contains(java.lang.Object o)
      Checks if ObjectList have object
      boolean containsAll(java.util.Collection c)
      Checks if ObjectList have collection
      java.lang.Object get(int index)
      Return object for specified index
      java.util.List getList()
      Gets List from ObjectList
      int indexOf(java.lang.Object o)
      Returns index of the object in ObjectList
      boolean isEmpty()
      Return indicator if ObjectList empty or not
      java.util.Iterator iterator()
      Get ObjectList iterator
      int lastIndexOf(java.lang.Object o)
      Returns last index of the object in ObjectList
      java.util.ListIterator listIterator()
      Get ObjectList list iterator
      java.util.ListIterator listIterator(int index)
      Get ObjectList list iterator for specific index
      java.lang.Object remove(int index)
      Remove object from ObjectList for specified index
      boolean remove(java.lang.Object o)
      Remove object from ObjectList for specified index
      boolean removeAll(java.util.Collection c)
      Remove collection of objects from ObjectList
      boolean retainAll(java.util.Collection c)
      Checks if ObjectList have collection
      java.lang.Object set(int index, java.lang.Object element) 
      int size()
      Return size of the ObjectList
      java.util.List subList(int fromIndex, int toIndex)
      Gets Sub List from ObjectList from to index
      java.lang.Object[] toArray()
      Converts ObjectList to array
      java.lang.Object[] toArray(java.lang.Object[] a)
      Converts ObjectList to object array
      java.util.Collection toElementCollection(java.util.Collection c)
      Converts Collection to Element Collection
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.List

        equals, hashCode, replaceAll, sort, spliterator
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream
      • Methods inherited from interface java.lang.Iterable

        forEach
    • Constructor Detail

      • ObjectList

        public ObjectList()
        Default Constructor
      • ObjectList

        public ObjectList(java.util.List c)
        Constructor
        Parameters:
        c - Original List.
    • Method Detail

      • size

        public int size()
        Return size of the ObjectList
        Specified by:
        size in interface java.util.Collection
        Specified by:
        size in interface java.util.List
        Returns:
        ObjectList size
      • clear

        public void clear()
        Clears ObjectList object
        Specified by:
        clear in interface java.util.Collection
        Specified by:
        clear in interface java.util.List
      • isEmpty

        public boolean isEmpty()
        Return indicator if ObjectList empty or not
        Specified by:
        isEmpty in interface java.util.Collection
        Specified by:
        isEmpty in interface java.util.List
        Returns:
        is ObjectList empty or not
      • toArray

        public java.lang.Object[] toArray()
        Converts ObjectList to array
        Specified by:
        toArray in interface java.util.Collection
        Specified by:
        toArray in interface java.util.List
        Returns:
        Object array
      • get

        public java.lang.Object get(int index)
        Return object for specified index
        Specified by:
        get in interface java.util.List
        Returns:
        Object from ObjectList
      • remove

        public java.lang.Object remove(int index)
        Remove object from ObjectList for specified index
        Specified by:
        remove in interface java.util.List
        Parameters:
        index - Index of object to be removed
        Returns:
        Object which as removed
      • add

        public void add(int index,
                        java.lang.Object element)
        Adds object to ObjectList for specific index
        Specified by:
        add in interface java.util.List
        Parameters:
        index - Index of object to be added
        element - Object to be added
      • indexOf

        public int indexOf(java.lang.Object o)
        Returns index of the object in ObjectList
        Specified by:
        indexOf in interface java.util.List
        Parameters:
        o - Object to be checked
        Returns:
        index of the object in the ObjectList
      • lastIndexOf

        public int lastIndexOf(java.lang.Object o)
        Returns last index of the object in ObjectList
        Specified by:
        lastIndexOf in interface java.util.List
        Parameters:
        o - Object to be checked
        Returns:
        index of the object in the ObjectList
      • add

        public boolean add(java.lang.Object o)
        Adds object to ObjectList at the end
        Specified by:
        add in interface java.util.Collection
        Specified by:
        add in interface java.util.List
        Parameters:
        o - Object to be added
      • contains

        public boolean contains(java.lang.Object o)
        Checks if ObjectList have object
        Specified by:
        contains in interface java.util.Collection
        Specified by:
        contains in interface java.util.List
        Parameters:
        o - Object to be added
        Returns:
        indicator if ObjectLit contain object
      • remove

        public boolean remove(java.lang.Object o)
        Remove object from ObjectList for specified index
        Specified by:
        remove in interface java.util.Collection
        Specified by:
        remove in interface java.util.List
        Parameters:
        o - Object which as removed
        Returns:
        indicator if remove was successful
      • addAll

        public boolean addAll(int index,
                              java.util.Collection c)
        Adds collection to ObjectList at the index specified
        Specified by:
        addAll in interface java.util.List
        Parameters:
        index - Index of collection to be added
        c - Collection to be added
        Returns:
        indicator if add was successful
      • addAll

        public boolean addAll(java.util.Collection c)
        Adds collection to ObjectList at the end
        Specified by:
        addAll in interface java.util.Collection
        Specified by:
        addAll in interface java.util.List
        Parameters:
        c - Collection to be added
        Returns:
        indicator if add was successful
      • containsAll

        public boolean containsAll(java.util.Collection c)
        Checks if ObjectList have collection
        Specified by:
        containsAll in interface java.util.Collection
        Specified by:
        containsAll in interface java.util.List
        Parameters:
        c - Collection to check
        Returns:
        indicator if ObjectLit contain collection
      • removeAll

        public boolean removeAll(java.util.Collection c)
        Remove collection of objects from ObjectList
        Specified by:
        removeAll in interface java.util.Collection
        Specified by:
        removeAll in interface java.util.List
        Parameters:
        c - Collection to remove
        Returns:
        indicator if ObjectLit removed collection
      • retainAll

        public boolean retainAll(java.util.Collection c)
        Checks if ObjectList have collection
        Specified by:
        retainAll in interface java.util.Collection
        Specified by:
        retainAll in interface java.util.List
        Parameters:
        c - Collection to retail
        Returns:
        indicator if ObjectLit retained collection
      • iterator

        public java.util.Iterator iterator()
        Get ObjectList iterator
        Specified by:
        iterator in interface java.lang.Iterable
        Specified by:
        iterator in interface java.util.Collection
        Specified by:
        iterator in interface java.util.List
        Returns:
        ObjectList iterator
      • subList

        public java.util.List subList(int fromIndex,
                                      int toIndex)
        Gets Sub List from ObjectList from to index
        Specified by:
        subList in interface java.util.List
        Parameters:
        fromIndex - from index
        toIndex - to index
        Returns:
        sub list
      • listIterator

        public java.util.ListIterator listIterator()
        Get ObjectList list iterator
        Specified by:
        listIterator in interface java.util.List
        Returns:
        ObjectList list iterator
      • listIterator

        public java.util.ListIterator listIterator(int index)
        Get ObjectList list iterator for specific index
        Specified by:
        listIterator in interface java.util.List
        Parameters:
        index - to iterate
        Returns:
        ObjectList list iterator
      • set

        public java.lang.Object set(int index,
                                    java.lang.Object element)
        Specified by:
        set in interface java.util.List
      • toArray

        public java.lang.Object[] toArray(java.lang.Object[] a)
        Converts ObjectList to object array
        Specified by:
        toArray in interface java.util.Collection
        Specified by:
        toArray in interface java.util.List
        Parameters:
        a - object to convert
        Returns:
        Converted Object list
      • toElementCollection

        public java.util.Collection toElementCollection(java.util.Collection c)
        Converts Collection to Element Collection
        Parameters:
        c - collection to convert
        Returns:
        Converted Collection
      • getList

        public java.util.List getList()
        Gets List from ObjectList
        Returns:
        list