Class RegularToMutableObjectIterator<T>

    • Constructor Detail

      • RegularToMutableObjectIterator

        public RegularToMutableObjectIterator​(Iterator<T> iterator,
                                              TypeSerializer<T> serializer)
    • Method Detail

      • next

        public T next​(T reuse)
        Description copied from interface: MutableObjectIterator
        Gets the next element from the collection. The contents of that next element is put into the given reuse object, if the type is mutable.
        Specified by:
        next in interface MutableObjectIterator<T>
        Parameters:
        reuse - The target object into which to place next element if E is mutable.
        Returns:
        The filled object or null if the iterator is exhausted.
      • next

        public T next()
        Description copied from interface: MutableObjectIterator
        Gets the next element from the collection. The iterator implementation must obtain a new instance.
        Specified by:
        next in interface MutableObjectIterator<T>
        Returns:
        The object or null if the iterator is exhausted.