Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Wagelaar2015-12-07 09:33:35 -0500
committerDennis Wagelaar2015-12-07 09:33:35 -0500
commit14c8affdaad18087a74c0c8b545b6ce7b9dffc57 (patch)
treea81d1efddd64df4615db9578e31e7fe29e540e27 /plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse
parent415f99b8e656131340e6bd43bfc3d67e763f71a3 (diff)
downloadorg.eclipse.atl-14c8affdaad18087a74c0c8b545b6ce7b9dffc57.tar.gz
org.eclipse.atl-14c8affdaad18087a74c0c8b545b6ce7b9dffc57.tar.xz
org.eclipse.atl-14c8affdaad18087a74c0c8b545b6ce7b9dffc57.zip
Fix generic parameters.
Diffstat (limited to 'plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyBag.java22
-rw-r--r--plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyCollection.java38
-rw-r--r--plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyList.java32
-rw-r--r--plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyOrderedSet.java26
-rw-r--r--plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazySet.java24
5 files changed, 71 insertions, 71 deletions
diff --git a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyBag.java b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyBag.java
index 09dd2145..7e830301 100644
--- a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyBag.java
+++ b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyBag.java
@@ -62,7 +62,7 @@ public class LazyBag<E> extends LazyCollection<E> {
* {@inheritDoc}
*/
@Override
- public int count(E o) {
+ public int count(Object o) {
return (object == null ? o == null : object.equals(o)) ? 1 : 0 +
((LazyCollection<E>)dataSource).count(o);
}
@@ -98,14 +98,14 @@ public class LazyBag<E> extends LazyCollection<E> {
*/
public static class UnionBag<E> extends LazyBag<E> {
- protected final LazyCollection<E> other;
+ protected final LazyCollection<? extends E> other;
/**
* Creates a new {@link UnionBag}.
* @param other the collection to union with <pre>dataSource</pre>
* @param dataSource the underlying collection
*/
- public UnionBag(final LazyCollection<E> other, final LazyCollection<E> dataSource) {
+ public UnionBag(final LazyCollection<? extends E> other, final LazyCollection<E> dataSource) {
super(dataSource);
this.other = other;
}
@@ -122,7 +122,7 @@ public class LazyBag<E> extends LazyCollection<E> {
* {@inheritDoc}
*/
@Override
- public int count(E object) {
+ public int count(Object object) {
return ((LazyCollection<E>)dataSource).count(object) + other.count(object);
}
@@ -204,7 +204,7 @@ public class LazyBag<E> extends LazyCollection<E> {
* {@inheritDoc}
*/
@Override
- public int count(Integer object) {
+ public int count(Object object) {
// All elements of a range are unique
return contains(object) ? 1 : 0;
}
@@ -288,7 +288,7 @@ public class LazyBag<E> extends LazyCollection<E> {
* {@inheritDoc}
*/
@Override
- public int count(Long object) {
+ public int count(Object object) {
// All elements of a range are unique
return contains(object) ? 1 : 0;
}
@@ -488,7 +488,7 @@ public class LazyBag<E> extends LazyCollection<E> {
* @param bag the collection to union with this
* @return The union of self and <code>bag</code>.
*/
- public LazyBag<E> union(final LazyBag<E> bag) {
+ public LazyBag<E> union(final LazyBag<? extends E> bag) {
return new UnionBag<E>(bag, this);
}
@@ -579,7 +579,7 @@ public class LazyBag<E> extends LazyCollection<E> {
* @return The collection containing all elements of self plus <code>coll</code>.
*/
@Override
- public LazyBag<E> includingAll(final Collection<E> coll) {
+ public LazyBag<E> includingAll(final Collection<? extends E> coll) {
return union(LazyCollections.asLazyBag(coll));
}
@@ -597,7 +597,7 @@ public class LazyBag<E> extends LazyCollection<E> {
* @throws UnsupportedOperationException
*/
@Override
- public LazyBag<E> includingAll(final Collection<E> coll, final int index) {
+ public LazyBag<E> includingAll(final Collection<? extends E> coll, final int index) {
throw new UnsupportedOperationException("Cannot specify index for adding values to unordered collections");
}
@@ -611,7 +611,7 @@ public class LazyBag<E> extends LazyCollection<E> {
* the object to exclude
* @return The bag containing all elements of self apart from all occurrences of <code>object</code>.
*/
- public LazyBag<E> excluding(final E object) {
+ public LazyBag<E> excluding(final Object object) {
return new LazyBag<E>(this) {
@Override
public Iterator<E> iterator() {
@@ -634,7 +634,7 @@ public class LazyBag<E> extends LazyCollection<E> {
* @return The collection containing all elements of self minus <code>coll</code>.
*/
@Override
- public LazyBag<E> excludingAll(final Collection<E> coll) {
+ public LazyBag<E> excludingAll(final Collection<?> coll) {
return new LazyBag<E>(this) {
@Override
public Iterator<E> iterator() {
diff --git a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyCollection.java b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyCollection.java
index 45419992..e264b586 100644
--- a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyCollection.java
+++ b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyCollection.java
@@ -562,7 +562,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
*/
public class ExcludingIterator extends CachingIterator {
- protected final E object;
+ protected final Object object;
protected E next;
protected boolean nextSet;
@@ -570,7 +570,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* Creates a new {@link ExcludingIterator}, which excludes <code>object</code>.
* @param object the object to exclude
*/
- public ExcludingIterator(final E object) {
+ public ExcludingIterator(final Object object) {
super(dataSource.iterator());
this.object = object;
}
@@ -694,7 +694,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
*/
public class SubtractionIterator extends CachingIterator {
- protected final Collection<E> s;
+ protected final Collection<?> s;
protected E next;
protected boolean nextSet;
@@ -702,7 +702,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* Creates a new {@link SubtractionIterator} on this and <code>s</code>.
* @param s the collection to subtract from this
*/
- public SubtractionIterator(final Collection<E> s) {
+ public SubtractionIterator(final Collection<?> s) {
super(dataSource.iterator());
this.s = s;
}
@@ -761,8 +761,8 @@ public abstract class LazyCollection<E> implements Collection<E> {
*/
public class UnionIterator extends WrappedIterator {
- protected final Iterable<E> s;
- protected Iterator<E> added; // lazily instantiate this iterator
+ protected final Iterable<? extends E> s;
+ protected Iterator<? extends E> added; // lazily instantiate this iterator
protected boolean innerNext; // cache last inner.hasNext() invocation
/**
@@ -770,7 +770,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* collection and <code>s</code>.
* @param s the collection to union with this
*/
- public UnionIterator(final Iterable<E> s) {
+ public UnionIterator(final Iterable<? extends E> s) {
super();
this.s = s;
}
@@ -816,8 +816,8 @@ public abstract class LazyCollection<E> implements Collection<E> {
*/
public class UnionSetIterator extends CachingSetIterator {
- protected final Iterable<E> s;
- protected Iterator<E> added; // lazily instantiate this iterator
+ protected final Iterable<? extends E> s;
+ protected Iterator<? extends E> added; // lazily instantiate this iterator
protected boolean innerNext; // cache last inner.hasNext() invocation
/**
@@ -825,7 +825,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* collection and <code>s</code>.
* @param s the collection to union with this
*/
- public UnionSetIterator(final Iterable<E> s) {
+ public UnionSetIterator(final Iterable<? extends E> s) {
super();
this.s = s;
}
@@ -1853,7 +1853,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* @param object the object to check for
* @return <code>true</code> if <code>object</code> is an element of self, <code>false</code> otherwise.
*/
- public boolean includes(final E object) {
+ public boolean includes(final Object object) {
return contains(object);
}
@@ -1862,7 +1862,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* @param object the object to check for
* @return <code>true</code> if <code>object</code> is not an element of self, <code>false</code> otherwise.
*/
- public boolean excludes(final E object) {
+ public boolean excludes(final Object object) {
return !contains(object);
}
@@ -1871,7 +1871,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* @param object the object to check for
* @return The number of times that <code>object</code> occurs in the collection self.
*/
- public synchronized int count(final E object) {
+ public synchronized int count(final Object object) {
if (occurrences == null) {
occurrences = new HashMap<E, Integer>();
for (E e : this) {
@@ -1890,7 +1890,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* @param c2 the collection to check
* @return <code>true</code> iff self contains all elements of <code>c2</code>.
*/
- public boolean includesAll(final Collection<E> c2) {
+ public boolean includesAll(final Collection<?> c2) {
return containsAll(c2);
}
@@ -1899,7 +1899,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* @param c2 the collection to check
* @return <code>true</code> iff self contains no elements of <code>c2</code>.
*/
- public boolean excludesAll(final Collection<E> c2) {
+ public boolean excludesAll(final Collection<?> c2) {
return !containsAny(c2);
}
@@ -2136,7 +2136,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* the collection to include
* @return The collection containing all elements of self plus <code>coll</code>.
*/
- public abstract LazyCollection<E> includingAll(Collection<E> coll);
+ public abstract LazyCollection<E> includingAll(Collection<? extends E> coll);
/**
* Returns the collection containing all elements of self plus <code>coll</code>.
@@ -2150,7 +2150,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* the index at which to insert <code>coll</code> (starting at 1)
* @return The collection containing all elements of self plus <code>coll</code>.
*/
- public abstract LazyCollection<E> includingAll(Collection<E> coll, int index);
+ public abstract LazyCollection<E> includingAll(Collection<? extends E> coll, int index);
/**
* Returns the collection containing all elements of self apart from all occurrences of <code>object</code>.
@@ -2162,7 +2162,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* the object to exclude
* @return The collection containing all elements of self apart from all occurrences of <code>object</code>.
*/
- public abstract LazyCollection<E> excluding(final E object);
+ public abstract LazyCollection<E> excluding(final Object object);
/**
* Returns the collection containing all elements of self minus <code>coll</code>.
@@ -2174,7 +2174,7 @@ public abstract class LazyCollection<E> implements Collection<E> {
* the collection to exclude
* @return The collection containing all elements of self minus <code>coll</code>.
*/
- public abstract LazyCollection<E> excludingAll(Collection<E> coll);
+ public abstract LazyCollection<E> excludingAll(Collection<?> coll);
/**
* Returns the collection containing all elements of self plus the collection of <code>first</code> running to <code>last</code>.
diff --git a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyList.java b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyList.java
index 91d4a73d..e7ea5272 100644
--- a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyList.java
+++ b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyList.java
@@ -70,14 +70,14 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
*/
public static class UnionList<E> extends NonCachingList<E> {
- protected final LazyList<E> s;
+ protected final LazyList<? extends E> s;
/**
* Creates a new {@link UnionList}.
* @param s the collection to union with the underlying collection
* @param dataSource the underlying collection
*/
- public UnionList(final LazyList<E> s, final LazyList<E> dataSource) {
+ public UnionList(final LazyList<? extends E> s, final LazyList<E> dataSource) {
super(dataSource);
this.s = s;
assert s != null;
@@ -163,7 +163,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* {@inheritDoc}
*/
@Override
- public int count(E object) {
+ public int count(Object object) {
return ((LazyCollection<E>)dataSource).count(object) + s.count(object);
}
@@ -362,7 +362,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* {@inheritDoc}
*/
@Override
- public int count(final E o) {
+ public int count(final Object o) {
return (object == null ? o == null : object.equals(o)) ? 1 : 0 +
((LazyCollection<E>)dataSource).count(o);
}
@@ -1242,7 +1242,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* {@inheritDoc}
*/
@Override
- public int count(Integer object) {
+ public int count(Object object) {
// All elements of a range are unique
return contains(object) ? 1 : 0;
}
@@ -1390,7 +1390,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* {@inheritDoc}
*/
@Override
- public int count(Long object) {
+ public int count(Object object) {
// All elements of a range are unique
return contains(object) ? 1 : 0;
}
@@ -1429,8 +1429,8 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
*/
public class UnionListIterator extends WrappedListIterator {
- protected final List<E> s;
- protected ListIterator<E> added; // lazily instantiate this iterator
+ protected final List<? extends E> s;
+ protected ListIterator<? extends E> added; // lazily instantiate this iterator
protected boolean innerNext; // cache last inner.hasNext() invocation
protected boolean addedPrev; // cache last added.hasPrevious() invocation
@@ -1439,7 +1439,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* collection and <code>s</code>.
* @param s the collection to union
*/
- public UnionListIterator(final List<E> s) {
+ public UnionListIterator(final List<? extends E> s) {
super();
this.s = s;
}
@@ -1450,7 +1450,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* @param s the collection to union
* @param index the iterator starting index.
*/
- public UnionListIterator(final List<E> s, final int index) {
+ public UnionListIterator(final List<? extends E> s, final int index) {
super(index);
this.s = s;
}
@@ -1865,7 +1865,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* @param s the list to union with this
* @return The sequence consisting of all elements in self, followed by all elements in <code>s</code>.
*/
- public LazyList<E> union(final LazyList<E> s) {
+ public LazyList<E> union(final LazyList<? extends E> s) {
return new UnionList<E>(s, this);
}
@@ -1881,7 +1881,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* the insertion index (starting at 1)
* @return The sequence consisting of all elements in self, with all elements in <code>s</code> inserted at <code>index</code>
*/
- public LazyList<E> union(final LazyList<E> s, final int index) {
+ public LazyList<E> union(final LazyList<? extends E> s, final int index) {
if (index == 1) {
return union(s);
}
@@ -1998,7 +1998,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* @return The collection containing all elements of self plus <code>coll</code>.
*/
@Override
- public LazyList<E> includingAll(final Collection<E> coll) {
+ public LazyList<E> includingAll(final Collection<? extends E> coll) {
return union(LazyCollections.asLazyList(coll));
}
@@ -2015,7 +2015,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* @return The collection containing all elements of self plus <code>coll</code>.
*/
@Override
- public LazyList<E> includingAll(final Collection<E> coll, final int index) {
+ public LazyList<E> includingAll(final Collection<? extends E> coll, final int index) {
if (index > 0) {
return union(LazyCollections.asLazyList(coll), index);
} else {
@@ -2033,7 +2033,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* the object to exclude
* @return The sequence containing all elements of self apart from all occurrences of <code>object</code>.
*/
- public LazyList<E> excluding(final E object) {
+ public LazyList<E> excluding(final Object object) {
return new LazyList<E>(this) {
@Override
public Iterator<E> iterator() {
@@ -2056,7 +2056,7 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> {
* @return The collection containing all elements of self minus <code>coll</code>.
*/
@Override
- public LazyList<E> excludingAll(final Collection<E> coll) {
+ public LazyList<E> excludingAll(final Collection<?> coll) {
return new LazyList<E>(this) {
@Override
public Iterator<E> iterator() {
diff --git a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyOrderedSet.java b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyOrderedSet.java
index b99369db..31843c50 100644
--- a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyOrderedSet.java
+++ b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyOrderedSet.java
@@ -373,7 +373,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* {@inheritDoc}
*/
@Override
- public int count(final E o) {
+ public int count(final Object o) {
return (object == null ? o == null : object.equals(o)) ? 1 :
((LazyCollection<E>)dataSource).count(o);
}
@@ -1279,7 +1279,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
}
}
- protected final E object;
+ protected final Object object;
protected int excludedIndex;
protected boolean excludedIndexSet;
@@ -1288,7 +1288,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* @param object the object to exclude
* @param dataSource the underlying collection
*/
- public ExcludingOrderedSet(final E object, final LazyOrderedSet<E> dataSource) {
+ public ExcludingOrderedSet(final Object object, final LazyOrderedSet<E> dataSource) {
super(dataSource);
this.object = object;
}
@@ -1306,7 +1306,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* {@inheritDoc}
*/
@Override
- public int count(final E o) {
+ public int count(final Object o) {
return (object == null ? o == null : object.equals(o)) ? 0 :
((LazyCollection<E>)dataSource).count(o);
}
@@ -1658,7 +1658,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* {@inheritDoc}
*/
@Override
- public int count(Integer object) {
+ public int count(Object object) {
// All elements of a range are unique
return contains(object) ? 1 : 0;
}
@@ -1806,7 +1806,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* {@inheritDoc}
*/
@Override
- public int count(Long object) {
+ public int count(Object object) {
// All elements of a range are unique
return contains(object) ? 1 : 0;
}
@@ -2048,7 +2048,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* the object to count
* @return The number of occurrences of <code>object</code> in self.
*/
- public int count(final E o) {
+ public int count(final Object o) {
return contains(o) ? 1 : 0;
}
@@ -2142,7 +2142,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* @param s the collection to union with self
* @return The union of self and <code>s</code>.
*/
- public LazyOrderedSet<E> union(final LazyOrderedSet<E> s) {
+ public LazyOrderedSet<E> union(final LazyOrderedSet<? extends E> s) {
return new LazyOrderedSet<E>(this) {
@Override
public Iterator<E> iterator() {
@@ -2166,7 +2166,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* the insertion index (starting at 1)
* @return The ordered set consisting of all elements in self, with all elements in <code>s</code> inserted at <code>index</code>
*/
- public LazyOrderedSet<E> union(final LazyOrderedSet<E> s, final int index) {
+ public LazyOrderedSet<E> union(final LazyOrderedSet<? extends E> s, final int index) {
if (index == 1) {
return union(s);
}
@@ -2337,7 +2337,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* @return The collection containing all elements of self plus <code>coll</code>.
*/
@Override
- public LazyOrderedSet<E> includingAll(final Collection<E> coll) {
+ public LazyOrderedSet<E> includingAll(final Collection<? extends E> coll) {
return union(LazyCollections.asLazyOrderedSet(coll));
}
@@ -2354,7 +2354,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* @return The collection containing all elements of self plus <code>coll</code>.
*/
@Override
- public LazyOrderedSet<E> includingAll(final Collection<E> coll, final int index) {
+ public LazyOrderedSet<E> includingAll(final Collection<? extends E> coll, final int index) {
if (index > 0) {
return union(LazyCollections.asLazyOrderedSet(coll), index);
} else {
@@ -2372,7 +2372,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* the element to exclude
* @return The set containing all elements of self without <code>object</code>.
*/
- public LazyOrderedSet<E> excluding(final E object) {
+ public LazyOrderedSet<E> excluding(final Object object) {
return new ExcludingOrderedSet<E>(object, this);
}
@@ -2387,7 +2387,7 @@ public class LazyOrderedSet<E> extends LazyCollection<E> implements Set<E>, List
* @return The collection containing all elements of self minus <code>coll</code>.
*/
@Override
- public LazyOrderedSet<E> excludingAll(final Collection<E> coll) {
+ public LazyOrderedSet<E> excludingAll(final Collection<?> coll) {
return new LazyOrderedSet<E>(this) {
@Override
public Iterator<E> iterator() {
diff --git a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazySet.java b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazySet.java
index 7b1f30f6..52e55237 100644
--- a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazySet.java
+++ b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazySet.java
@@ -159,7 +159,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
* {@inheritDoc}
*/
@Override
- public int count(final E o) {
+ public int count(final Object o) {
return (object == null ? o == null : object.equals(o)) ? 1 :
((LazyCollection<E>)dataSource).count(o);
}
@@ -269,7 +269,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
}
}
- protected final E object;
+ protected final Object object;
protected boolean containsExcluded;
protected boolean containsExcludedSet;
@@ -278,7 +278,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
* @param object the element to exclude
* @param dataSource the underlying collection
*/
- public ExcludingSet(final E object, final LazySet<E> dataSource) {
+ public ExcludingSet(final Object object, final LazySet<E> dataSource) {
super(dataSource);
this.object = object;
}
@@ -296,7 +296,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
* {@inheritDoc}
*/
@Override
- public int count(final E o) {
+ public int count(final Object o) {
return (object == null ? o == null : object.equals(o)) ? 0 :
((LazyCollection<E>)dataSource).count(o);
}
@@ -387,7 +387,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
* {@inheritDoc}
*/
@Override
- public int count(Integer object) {
+ public int count(Object object) {
// All elements of a range are unique
return contains(object) ? 1 : 0;
}
@@ -471,7 +471,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
* {@inheritDoc}
*/
@Override
- public int count(Long object) {
+ public int count(Object object) {
// All elements of a range are unique
return contains(object) ? 1 : 0;
}
@@ -595,7 +595,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
* @return The number of occurrences of <code>object</code> in self.
*/
@Override
- public int count(final E o) {
+ public int count(final Object o) {
return contains(o) ? 1 : 0;
}
@@ -609,7 +609,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
* @param s the collection to union with self
* @return The union of self and <code>s</code>.
*/
- public LazySet<E> union(final LazySet<E> s) {
+ public LazySet<E> union(final LazySet<? extends E> s) {
return new LazySet<E>(this) {
@Override
public Iterator<E> iterator() {
@@ -723,7 +723,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
* @return The collection containing all elements of self plus <code>coll</code>.
*/
@Override
- public LazySet<E> includingAll(final Collection<E> coll) {
+ public LazySet<E> includingAll(final Collection<? extends E> coll) {
return union(LazyCollections.asLazySet(coll));
}
@@ -741,7 +741,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
* @throws UnsupportedOperationException
*/
@Override
- public LazySet<E> includingAll(final Collection<E> coll, final int index) {
+ public LazySet<E> includingAll(final Collection<? extends E> coll, final int index) {
throw new UnsupportedOperationException("Cannot specify index for adding values to unordered collections");
}
@@ -755,7 +755,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
* the object to exclude
* @return The set containing all elements of self without <code>object</code>.
*/
- public LazySet<E> excluding(final E object) {
+ public LazySet<E> excluding(final Object object) {
return new ExcludingSet<E>(object, this);
}
@@ -770,7 +770,7 @@ public class LazySet<E> extends LazyCollection<E> implements Set<E> {
* @return The collection containing all elements of self minus <code>coll</code>.
*/
@Override
- public LazySet<E> excludingAll(final Collection<E> coll) {
+ public LazySet<E> excludingAll(final Collection<?> coll) {
return new LazySet<E>(this) {
@Override
public Iterator<E> iterator() {

Back to the top