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
-
copy(Container, Container)
- Insert the elements from one container into another container.
-
copy(Container, OutputIterator)
- Copy the elements from a container to a sequence.
-
copy(InputIterator, InputIterator, OutputIterator)
- Copy the elements from one range to another range of the same size.
-
copyBackward(BidirectionalIterator, BidirectionalIterator, BidirectionalIterator)
- Copy the elements backwards from one range to another range of the same size.
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.
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.
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.
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