Interface PartitionMutableBag<T>
- All Superinterfaces:
PartitionBag<T>
,PartitionIterable<T>
,PartitionMutableBagIterable<T>
,PartitionMutableCollection<T>
,PartitionUnsortedBag<T>
- All Known Implementing Classes:
PartitionHashBag
public interface PartitionMutableBag<T> extends PartitionMutableBagIterable<T>, PartitionUnsortedBag<T>
A PartitionMutableBag is the result of splitting a mutable bag into two mutable bags based on a Predicate.
The results that answer true for the Predicate will be returned from the getSelected() method and the results that answer
false for the predicate will be returned from the getRejected() method.
-
Method Summary
Modifier and Type Method Description MutableBag<T>
getRejected()
MutableBag<T>
getSelected()
PartitionImmutableBag<T>
toImmutable()
-
Method Details
-
getSelected
MutableBag<T> getSelected()- Specified by:
getSelected
in interfacePartitionBag<T>
- Specified by:
getSelected
in interfacePartitionIterable<T>
- Specified by:
getSelected
in interfacePartitionMutableBagIterable<T>
- Specified by:
getSelected
in interfacePartitionMutableCollection<T>
- Specified by:
getSelected
in interfacePartitionUnsortedBag<T>
-
getRejected
MutableBag<T> getRejected()- Specified by:
getRejected
in interfacePartitionBag<T>
- Specified by:
getRejected
in interfacePartitionIterable<T>
- Specified by:
getRejected
in interfacePartitionMutableBagIterable<T>
- Specified by:
getRejected
in interfacePartitionMutableCollection<T>
- Specified by:
getRejected
in interfacePartitionUnsortedBag<T>
-
toImmutable
PartitionImmutableBag<T> toImmutable()- Specified by:
toImmutable
in interfacePartitionMutableBagIterable<T>
- Specified by:
toImmutable
in interfacePartitionMutableCollection<T>
-