1 package uk.co.jezuk.mango; 2 3 9 public class Algorithms 10 { 11 15 static public java.util.Collection intersection(java.util.Collection coll1, java.util.Collection coll2, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.Intersection.execute(coll1.iterator(), coll2, results); } 16 static public java.util.Collection intersection(java.util.Iterator iter1, java.util.Collection coll2, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.Intersection.execute(iter1, coll2, results); } 17 static public java.util.Collection intersection(java.util.Iterator iter1, java.util.Iterator iter2, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.Intersection.execute(iter1, iter2, results); } 18 19 24 static public java.util.Collection symmetricDifference(java.util.Collection coll1, java.util.Collection coll2, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.SymmetricDifference.execute(coll1.iterator(), coll2, results); } 25 static public java.util.Collection symmetricDifference(java.util.Iterator iter1, java.util.Collection coll2, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.SymmetricDifference.execute(iter1, coll2, results); } 26 static public java.util.Collection symmetricDifference(java.util.Iterator iter1, java.util.Iterator iter2, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.SymmetricDifference.execute(iter1, iter2, results); } 27 28 29 33 static public void forEach(java.util.Collection collection, UnaryFunction fn) { uk.co.jezuk.mango.algorithms.ForEach.execute(collection.iterator(), fn); } 34 static public void forEach(java.util.Collection collection, int start, int end, UnaryFunction fn) { uk.co.jezuk.mango.algorithms.ForEach.execute(Iterators.BoundedIterator(collection.iterator(), start, end), fn); } 35 static public void forEach(java.util.List list, int start, int end, UnaryFunction fn) { uk.co.jezuk.mango.algorithms.ForEach.execute(Iterators.BoundedIterator(list, start, end), fn); } 36 static public void forEach(java.util.Iterator iterator, UnaryFunction fn) { uk.co.jezuk.mango.algorithms.ForEach.execute(iterator, fn); } 37 38 46 static public java.util.Collection transform(java.util.Collection collection, UnaryFunction fn, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.Transform.execute(collection.iterator(), fn, results); } 47 static public java.util.Collection transform(java.util.Collection collection, int start, int end, UnaryFunction fn, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.Transform.execute(Iterators.BoundedIterator(collection.iterator(), start, end), fn, results); } 48 static public java.util.Collection transform(java.util.List list, int start, int end, UnaryFunction fn, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.Transform.execute(Iterators.BoundedIterator(list, start, end), fn, results); } 49 static public java.util.Collection transform(java.util.Iterator iterator, UnaryFunction fn, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.Transform.execute(iterator, fn, results); } 50 51 58 static public int count(java.util.Collection collection, Object value) { return uk.co.jezuk.mango.algorithms.Count.execute(collection.iterator(), value); } 59 static public int count(java.util.Collection collection, int start, int end, Object value) { return uk.co.jezuk.mango.algorithms.Count.execute(Iterators.BoundedIterator(collection.iterator(), start, end), value); } 60 static public int count(java.util.List list, int start, int end, Object value) { return uk.co.jezuk.mango.algorithms.Count.execute(Iterators.BoundedIterator(list, start, end), value); } 61 static public int count(java.util.Iterator iterator, Object value) { return uk.co.jezuk.mango.algorithms.Count.execute(iterator, value); } 62 63 70 static public int countIf(java.util.Collection collection, Predicate test) { return uk.co.jezuk.mango.algorithms.CountIf.execute(collection.iterator(), test); } 71 static public int countIf(java.util.Collection collection, int start, int end, Predicate test) { return uk.co.jezuk.mango.algorithms.CountIf.execute(Iterators.BoundedIterator(collection.iterator(), start, end), test); } 72 static public int countIf(java.util.List list, int start, int end, Predicate test) { return uk.co.jezuk.mango.algorithms.CountIf.execute(Iterators.BoundedIterator(list, start, end), test); } 73 static public int countIf(java.util.Iterator iterator, Predicate test) { return uk.co.jezuk.mango.algorithms.CountIf.execute(iterator, test); } 74 75 82 static public int countIfNot(java.util.Collection collection, Predicate test) { return uk.co.jezuk.mango.algorithms.CountIfNot.execute(collection.iterator(), test); } 83 static public int countIfNot(java.util.Collection collection, int start, int end, Predicate test) { return uk.co.jezuk.mango.algorithms.CountIfNot.execute(Iterators.BoundedIterator(collection.iterator(), start, end), test); } 84 static public int countIfNot(java.util.List list, int start, int end, Predicate test) { return uk.co.jezuk.mango.algorithms.CountIfNot.execute(Iterators.BoundedIterator(list, start, end), test); } 85 static public int countIfNot(java.util.Iterator iterator, Predicate test) { return uk.co.jezuk.mango.algorithms.CountIfNot.execute(iterator, test); } 86 87 95 static public Object find(java.util.Collection collection, Object value) { return uk.co.jezuk.mango.algorithms.Find.execute(collection.iterator(), value); } 96 static public Object find(java.util.Collection collection, int start, int end, Object value) { return uk.co.jezuk.mango.algorithms.Find.execute(Iterators.BoundedIterator(collection.iterator(), start, end), value); } 97 static public Object find(java.util.List list, int start, int end, Object value) { return uk.co.jezuk.mango.algorithms.Find.execute(Iterators.BoundedIterator(list, start, end), value); } 98 static public Object find(java.util.Iterator iterator, Object value) { return uk.co.jezuk.mango.algorithms.Find.execute(iterator, value); } 99 100 108 static public int findPosition(java.util.Collection collection, Object value) { return uk.co.jezuk.mango.algorithms.FindPosition.execute(collection.iterator(), value); } 109 static public int findPosition(java.util.Collection collection, int start, int end, Object value) { return uk.co.jezuk.mango.algorithms.FindPosition.execute(Iterators.BoundedIterator(collection.iterator(), start, end), value); } 110 static public int findPosition(java.util.List list, int start, int end, Object value) { return uk.co.jezuk.mango.algorithms.FindPosition.execute(Iterators.BoundedIterator(list, start, end), value); } 111 static public int findPosition(java.util.Iterator iterator, Object value) { return uk.co.jezuk.mango.algorithms.FindPosition.execute(iterator, value); } 112 static public int findPositionIf(java.util.Collection collection, Predicate pred) { return uk.co.jezuk.mango.algorithms.FindPositionIf.execute(collection.iterator(), pred); } 113 static public int findPositionIf(java.util.Collection collection, int start, int end, Predicate pred) { return uk.co.jezuk.mango.algorithms.FindPositionIf.execute(Iterators.BoundedIterator(collection.iterator(), start, end), pred); } 114 static public int findPositionIf(java.util.List list, int start, int end, Predicate pred) { return uk.co.jezuk.mango.algorithms.FindPositionIf.execute(Iterators.BoundedIterator(list, start, end), pred); } 115 static public int findPositionIf(java.util.Iterator iterator, Predicate pred) { return uk.co.jezuk.mango.algorithms.FindPositionIf.execute(iterator, pred); } 116 117 124 static public Object findIf(java.util.Collection collection, Predicate test) { return uk.co.jezuk.mango.algorithms.FindIf.execute(collection.iterator(), test); } 125 static public Object findIf(java.util.Collection collection, int start, int end, Predicate test) { return uk.co.jezuk.mango.algorithms.FindIf.execute(Iterators.BoundedIterator(collection.iterator(), start, end), test); } 126 static public Object findIf(java.util.List list, int start, int end, Predicate test) { return uk.co.jezuk.mango.algorithms.FindIf.execute(Iterators.BoundedIterator(list, start, end), test); } 127 static public Object findIf(java.util.Iterator iterator, Predicate test) { return uk.co.jezuk.mango.algorithms.FindIf.execute(iterator, test); } 128 129 135 static public Object findIfNot(java.util.Collection collection, Predicate test) { return uk.co.jezuk.mango.algorithms.FindIfNot.execute(collection.iterator(), test); } 136 static public Object findIfNot(java.util.Collection collection, int start, int end, Predicate test) { return uk.co.jezuk.mango.algorithms.FindIfNot.execute(Iterators.BoundedIterator(collection.iterator(), start, end), test); } 137 static public Object findIfNot(java.util.List list, int start, int end, Predicate test) { return uk.co.jezuk.mango.algorithms.FindIfNot.execute(Iterators.BoundedIterator(list, start, end), test); } 138 static public Object findIfNot(java.util.Iterator iterator, Predicate test) { return uk.co.jezuk.mango.algorithms.FindIfNot.execute(iterator, test); } 139 140 143 static public void remove(java.util.Collection collection, Object value) { uk.co.jezuk.mango.algorithms.Remove.execute(collection.iterator(), value); } 144 static public void remove(java.util.Collection collection, int start, int end, Object value) { uk.co.jezuk.mango.algorithms.Remove.execute(Iterators.BoundedIterator(collection.iterator(), start, end), value); } 145 static public void remove(java.util.List list, int start, int end, Object value) { uk.co.jezuk.mango.algorithms.Remove.execute(Iterators.BoundedIterator(list, start, end), value); } 146 static public void remove(java.util.Iterator iterator, Object value) { uk.co.jezuk.mango.algorithms.Remove.execute(iterator, value); } 147 148 151 static public void removeIf(java.util.Collection collection, Predicate pred) { uk.co.jezuk.mango.algorithms.RemoveIf.execute(collection.iterator(), pred); } 152 static public void removeIf(java.util.Collection collection, int start, int end, Predicate pred) { uk.co.jezuk.mango.algorithms.RemoveIf.execute(Iterators.BoundedIterator(collection.iterator(), start, end), pred); } 153 static public void removeIf(java.util.List list, int start, int end, Predicate pred) { uk.co.jezuk.mango.algorithms.RemoveIf.execute(Iterators.BoundedIterator(list, start, end), pred); } 154 static public void removeIf(java.util.Iterator iterator, Predicate pred) { uk.co.jezuk.mango.algorithms.RemoveIf.execute(iterator, pred); } 155 156 161 static public java.util.Collection partition(java.util.Collection collection, Predicate pred, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.Partition.execute(collection.iterator(), pred, results); } 162 static public java.util.Collection partition(java.util.Collection collection, int start, int end, Predicate pred, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.Partition.execute(Iterators.BoundedIterator(collection.iterator(), start, end), pred, results); } 163 static public java.util.Collection partition(java.util.List list, int start, int end, Predicate pred, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.Partition.execute(Iterators.BoundedIterator(list, start, end), pred, results); } 164 static public java.util.Collection partition(java.util.Iterator iterator, Predicate pred, java.util.Collection results) { return uk.co.jezuk.mango.algorithms.Partition.execute(iterator, pred, results); } 165 166 174 static public void unique(java.util.Collection collection) { uk.co.jezuk.mango.algorithms.Unique.execute(collection.iterator(), null); } 175 static public void unique(java.util.Collection collection, int start, int end) { uk.co.jezuk.mango.algorithms.Unique.execute(Iterators.BoundedIterator(collection.iterator(), start, end), null); } 176 static public void unique(java.util.List list, int start, int end) { uk.co.jezuk.mango.algorithms.Unique.execute(Iterators.BoundedIterator(list, start, end), null); } 177 static public void unique(java.util.Iterator iterator) { uk.co.jezuk.mango.algorithms.Unique.execute(iterator, null); } 178 static public void unique(java.util.Collection collection, java.util.Comparator comparator) { uk.co.jezuk.mango.algorithms.Unique.execute(collection.iterator(), comparator); } 179 static public void unique(java.util.Collection collection, int start, int end, java.util.Comparator comparator) { uk.co.jezuk.mango.algorithms.Unique.execute(Iterators.BoundedIterator(collection.iterator(), start, end), comparator); } 180 static public void unique(java.util.List list, int start, int end, java.util.Comparator comparator) { uk.co.jezuk.mango.algorithms.Unique.execute(Iterators.BoundedIterator(list, start, end), comparator); } 181 static public void unique(java.util.Iterator iterator, java.util.Comparator comparator) { uk.co.jezuk.mango.algorithms.Unique.execute(iterator, comparator); } 182 183 private Algorithms() { } } | Popular Tags |