All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.objectspace.jgl.algorithms.Removing

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

public final class Removing
extends Object
The Removing class contains generic removing algorithms.

See Also:
RemovingExamples

Method Index

 o remove(ForwardIterator, ForwardIterator, Object)
Remove all occurrences of an object from a sequence.
 o remove(Sequence, Object)
Remove all occurrences of an object from a sequence.
 o removeCopy(Container, Container, Object)
Copy one container to another container, skipping any occurrences of a particular object.
 o removeCopy(Container, OutputIterator, Object)
Copy a container to a sequence, skipping any occurrences of a particular object.
 o removeCopy(InputIterator, InputIterator, OutputIterator, Object)
Copy one sequence to another sequence, skipping any occurrences of a particular object.
 o removeCopyIf(Container, Container, UnaryPredicate)
Copy one container to another container, skipping all objects that satisfy a predicate.
 o removeCopyIf(Container, OutputIterator, UnaryPredicate)
Copy a container to a sequence, skipping all objects that satisfy a predicate.
 o removeCopyIf(InputIterator, InputIterator, OutputIterator, UnaryPredicate)
Copy one sequence to another sequence, skipping all objects that satisfy a predicate.
 o removeIf(ForwardIterator, ForwardIterator, UnaryPredicate)
Remove all objects in a sequence that satisfy a predicate from a sequence.
 o removeIf(Sequence, UnaryPredicate)
Remove all objects in a sequence that satisfy a predicate from a container.

Methods

 o remove
 public static ForwardIterator remove(ForwardIterator first,
                                      ForwardIterator last,
                                      Object object)
Remove all occurrences of an object from a sequence. The size of the sequence is not altered; if n elements are removed, the last n elements of the sequence will have undefined values. The time complexity is linear and the space complexity is constant.

Parameters:
first - An iterator positioned at the first element of the sequence.
last - An iterator positioned immediately after the last element of the sequence.
object - The object to remove.
Returns:
An iterator positioned immediately after the last remaining element.
Throws: IllegalArgumentException
If the iterators are incompatible or if the containers upon which the iteratore operate is not a COM.objectspace.jgl.Sequence.
 o remove
 public static ForwardIterator remove(Sequence container,
                                      Object object)
Remove all occurrences of an object from a sequence. The size of the container is not altered; if n elements are removed, the last n elements of the container will have undefined values. The time complexity is linear and the space complexity is constant.

Parameters:
container - The container.
object - The object to remove.
Returns:
An iterator positioned immediately after the last remaining element.
 o removeIf
 public static ForwardIterator removeIf(ForwardIterator first,
                                        ForwardIterator last,
                                        UnaryPredicate predicate)
Remove all objects in a sequence that satisfy a predicate from a sequence. The size of the sequence is not altered; if n elements are removed, the last n elements of the sequence will have undefined values. The time complexity is linear and the space complexity is constant.

Parameters:
first - An iterator positioned at the first element of the sequence.
last - An iterator positioned immediately after the last element of the sequence.
predicate - A unary predicate.
Returns:
An iterator positioned immediately after the last remaining element.
Throws: IllegalArgumentException
If the iterators are incompatible or if the containers upon which the iteratore operate is not a COM.objectspace.jgl.Sequence.
 o removeIf
 public static ForwardIterator removeIf(Sequence container,
                                        UnaryPredicate predicate)
Remove all objects in a sequence that satisfy a predicate from a container. The size of the container is not altered; if n elements are removed, the last n elements of the container will have undefined values. The time complexity is linear and the space complexity is constant.

Parameters:
container - The container.
predicate - A unary predicate.
Returns:
An iterator positioned immediately after the last remaining element.
 o removeCopy
 public static OutputIterator removeCopy(InputIterator first,
                                         InputIterator last,
                                         OutputIterator result,
                                         Object object)
Copy one sequence to another sequence, skipping any occurrences of a particular object. The time complexity is linear and the space complexity is constant.

Parameters:
first - An iterator positioned at the first element of the input sequence.
last - An iterator positioned immediately after the last element of the input sequence.
result - An iterator positioned at the first element of the output sequence.
object - The object to remove.
Returns:
An iterator positioned immediately after the last element of the output sequence.
Throws: IllegalArgumentException
If the iterators are incompatible.
 o removeCopy
 public static OutputIterator removeCopy(Container container,
                                         OutputIterator result,
                                         Object object)
Copy a container to a sequence, skipping any occurrences of a particular object. The time complexity is linear and the space complexity is constant.

Parameters:
container - The source container.
result - An iterator positioned at the first element of the output sequence.
object - The object to remove.
Returns:
An iterator positioned immediately after the last element of the output sequence.
 o removeCopy
 public static void removeCopy(Container source,
                               Container destination,
                               Object object)
Copy one container to another container, skipping any occurrences of a particular object. The time complexity is linear and the space complexity is constant.

Parameters:
source - The source container.
destination - The destination container.
object - The object to remove.
 o removeCopyIf
 public static OutputIterator removeCopyIf(InputIterator first,
                                           InputIterator last,
                                           OutputIterator result,
                                           UnaryPredicate predicate)
Copy one sequence to another sequence, skipping all objects that satisfy a predicate. The time complexity is linear and the space complexity is constant.

Parameters:
first - An iterator positioned at the first element of the input sequence.
last - An iterator positioned immediately after the last element of the input sequence.
result - An iterator positioned at the first element of the output sequence.
predicate - A UnaryPredicate.
Returns:
An iterator positioned immediately after the last element of the output sequence.
Throws: IllegalArgumentException
If the iterators are incompatible.
 o removeCopyIf
 public static OutputIterator removeCopyIf(Container container,
                                           OutputIterator result,
                                           UnaryPredicate predicate)
Copy a container to a sequence, skipping all objects that satisfy a predicate. The time complexity is linear and the space complexity is constant.

Parameters:
container - The source container.
result - An iterator positioned at the first element of the output sequence.
predicate - A UnaryPredicate.
Returns:
An iterator positioned immediately after the last element of the output sequence.
 o removeCopyIf
 public static void removeCopyIf(Container source,
                                 Container destination,
                                 UnaryPredicate predicate)
Copy one container to another container, skipping all objects that satisfy a predicate. The time complexity is linear and the space complexity is constant.

Parameters:
source - The source container.
destination - The destination container.
predicate - A unary predicate.

All Packages  Class Hierarchy  This Package  Previous  Next  Index