Class ListObjectImpl

    • Constructor Detail

      • ListObjectImpl

        public ListObjectImpl​(ListClass dataClass)
    • Method Detail

      • getValues

        public List<DataObject> getValues()
        Description copied from interface: ListObject
        Returns a list of DataObjects contained in this ListObject.
        Specified by:
        getValues in interface ListObject
        Returns:
        A list of DataObjects contained in this ListObject
      • hasSameValueAsIn

        public boolean hasSameValueAsIn​(DataObject object)
        Description copied from interface: DataObject
        This method makes a deep compare. For atomic objects this is equal to the equal method. For sets, lists, aggregates, and others a deeper comparision is performed.
        Specified by:
        hasSameValueAsIn in interface DataObject
        Overrides:
        hasSameValueAsIn in class DataObjectImpl
        Parameters:
        object - The object to compare.
        Returns:
        true if the given object has the same value(s) as this one.
      • indexOf

        public int indexOf​(DataObject object)
        Description copied from interface: ListObject
        Searches for the first occurence of the given data object, testing for equality using the equals method.
        Specified by:
        indexOf in interface ListObject
        Parameters:
        object - the data object that should be searched
        Returns:
        the index of the first occurrence of the argument in this list; returns -1 if the object is not found.
        See Also:
        Object.equals(Object)
      • indexOf

        public int indexOf​(DataObject object,
                           int index)
                    throws IndexOutOfBoundsException
        Description copied from interface: ListObject
        Searches for the first occurence of the given object, beginning the search at index , and testing for equality using the equals method.
        Specified by:
        indexOf in interface ListObject
        Parameters:
        object - the data object that should be searched
        index - the non-negative index to start searching from.
        Returns:
        the index of the first occurrence of the object argument in this list at position index or later in the vector; returns -1 if the object is not found. (Returns -1 if index >= the current size of this list.)
        Throws:
        IndexOutOfBoundsException - if the index was invalid.
        See Also:
        Object.equals(Object)
      • insertAt

        public void insertAt​(DataObject value,
                             int index)
                      throws IndexOutOfBoundsException,
                             InvalidTypeException
        Description copied from interface: ListObject
        Inserts the specified data object in this list at the specified index. Each object in this list with an index greater or equal to the specified index is shifted upward to have an index one greater than the value it had previously.

        The index must be a value greater than or equal to 0 and less than or equal to the current size of the list. (If the index is equal to the current size of the list, the new object is appended to the list.)

        Specified by:
        insertAt in interface ListObject
        Parameters:
        value - the data object to insert.
        index - where to insert the new object.
        Throws:
        IndexOutOfBoundsException - if the index was invalid.
        InvalidTypeException - if the value type is incompatible to the element type.
      • removeAt

        public void removeAt​(int index)
                      throws IndexOutOfBoundsException
        Description copied from interface: ListObject
        Deletes the object at the specified index. Each object in this list with an index greater or equal to the specified index is shifted downward to have an index one smaller than the value it had previously. The size of this list is decreased by 1.

        The index must be a value greater than or equal to 0 and less than the current size of the list.

        Specified by:
        removeAt in interface ListObject
        Parameters:
        index - the index of the object to remove.
        Throws:
        IndexOutOfBoundsException - if the index was invalid.