All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.objectspace.jgl.algorithms.Copying

java.lang.Object
   |
   +----COM.objectspace.jgl.algorithms.Copying

public final class Copying
extends Object
The Copying class contains generic copying algorithms.

See Also:
CopyingExamples

Method Index

 o copy(Container, Container)
Insert the elements from one container into another container.
 o copy(Container, OutputIterator)
Copy the elements from a container to a sequence.
 o copy(InputIterator, InputIterator, OutputIterator)
Copy the elements from one range to another range of the same size.
 o copyBackward(BidirectionalIterator, BidirectionalIterator, BidirectionalIterator)
Copy the elements backwards from one range to another range of the same size.

Methods

 o copy
 public static OutputIterator copy(InputIterator first,
                                   InputIterator last,
                                   OutputIterator result)
Copy the elements from one range to another range of the same size. Time complexity is linear and space complexity is constant.

Parameters:
first - An iterator positioned at the first element of the input range.
last - An iterator positioned immediately after the last element of the input range.
result - An iterator positioned at the first element of the output range.
Returns:
An iterator positioned immediately after the last element of the output range.
Throws: IllegalArgumentException
If the iterators are incompatible.
 o copy
 public static OutputIterator copy(Container input,
                                   OutputIterator result)
Copy the elements from a container to a sequence. Time complexity is linear and space complexity is constant.

Parameters:
input - The input container.
result - An iterator positioned at the first element of the output sequence.
Returns:
An iterator positioned immediately after the last element of the output sequence.
 o copy
 public static void copy(Container source,
                         Container destination)
Insert the elements from one container into another container. Time complexity is linear and space complexity is constant.

Parameters:
source - The source container.
destination - The destination container.
 o copyBackward
 public static OutputIterator copyBackward(BidirectionalIterator first,
                                           BidirectionalIterator last,
                                           BidirectionalIterator result)
Copy the elements backwards from one range to another range of the same size. Time complexity is linear and space complexity is constant.

Parameters:
first - An iterator positioned at the first element of the input range.
last - An iterator positioned immediately after the last element of the input range.
result - An iterator positioned immediately after the last element of the output range.
Returns:
An iterator positioned at the first element of the output range.
Throws: IllegalArgumentException
If the iterators are incompatible.

All Packages  Class Hierarchy  This Package  Previous  Next  Index