Class AbstractListWrapper<T>

    • Constructor Detail

      • AbstractListWrapper

        public AbstractListWrapper​(java.util.List<T> list,
                                   TypeRegistry registry,
                                   boolean set,
                                   java.lang.Class<?> param)
        Creates a new array collection wrapper.
        Parameters:
        list - the wrapped list
        set - does this type represent a set or a sequence
        registry - the type registry to use for the conversion of param
        param - the type parameter characterizing
      • AbstractListWrapper

        public AbstractListWrapper​(java.util.List<T> list,
                                   boolean set,
                                   TypeDescriptor<?>... params)
        Creates a new array collection wrapper.
        Parameters:
        list - the wrapped list
        set - does this type represent a set or a sequence
        params - the type parameter characterizing
    • Method Detail

      • removeDuplicates

        protected static <T> java.util.List<T> removeDuplicates​(java.util.List<T> elements)
        Removes duplicates from the given list.
        Type Parameters:
        T - the element type
        Parameters:
        elements - the elements to remove duplicates from (may be null)
        Returns:
        a list of elements without duplicates, may be null if elements is null
      • getList

        protected java.util.List<T> getList()
        Returns the list for further use.
        Returns:
        the list
      • getGenericParameter

        protected TypeDescriptor<?>[] getGenericParameter()
        Returns the params for further use.
        Returns:
        the params
      • iterator

        public java.util.Iterator<T> iterator()
        Description copied from interface: Collection
        Returns an iterator on the individual elements of this collection.
        Specified by:
        iterator in interface Collection<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Returns:
        the iterator
      • size

        public int size()
        Description copied from interface: Collection
        Returns the number of elements in the underlying collection.
        Specified by:
        size in interface Collection<T>
        Returns:
        the number of elements
      • getGenericParameterCount

        public int getGenericParameterCount()
        Description copied from interface: Collection
        Returns the number of generic parameters of T.
        Specified by:
        getGenericParameterCount in interface Collection<T>
        Returns:
        the number of generic parameter
      • getGenericParameterType

        public TypeDescriptor<?> getGenericParameterType​(int index)
        Description copied from interface: Collection
        Returns the type of the specified generic parameter of T.
        Specified by:
        getGenericParameterType in interface Collection<T>
        Parameters:
        index - the 0-based index of the generic parameter
        Returns:
        the actual type of the generic parameter
      • getStringValue

        public java.lang.String getStringValue​(IStringValueProvider.StringComparator comparator)
        Description copied from interface: IStringValueProvider
        Returns the string value of this object.
        Specified by:
        getStringValue in interface IStringValueProvider
        Parameters:
        comparator - if the sequence of elements, e.g., in case of collections, shall be ordered according to the comparator, null if the original sequence shall be returned
        Returns:
        the string value
      • allowSequenceAdjustment

        public boolean allowSequenceAdjustment()
        Description copied from interface: Collection
        Returns whether a IStringValueProvider may reorder the sequence of this collection for (test) output.
        Specified by:
        allowSequenceAdjustment in interface Collection<T>
        Returns:
        true if a value provider may reorder the sequence, false else
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toMappedList

        public java.util.List<T> toMappedList()
        Turns the array into a list for mapping to external Java types.
        Returns:
        the list
      • toMappedSet

        public java.util.Set<T> toMappedSet()
        Turns the array into a set for mapping to external Java types.
        Returns:
        the list
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clear

        public void clear()
        Description copied from interface: Collection
        Clears this collection.
        Specified by:
        clear in interface Collection<T>