Skip to content
Snippets Groups Projects
Commit 3ab94b24 authored by Sören Henning's avatar Sören Henning
Browse files

removed unused class

parent 3527e593
No related branches found
No related tags found
1 merge request!19Trace aggr analysis
package kieker.analysis.domain.systemdependency;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
@Deprecated
public class SystemEntitySet<E extends SystemEntity> implements Set<E> {
private final Map<String, E> entries;
public SystemEntitySet() {
this.entries = new HashMap<>();
}
@Override
public int size() {
return entries.size();
}
@Override
public boolean isEmpty() {
return entries.isEmpty();
}
@Override
public boolean contains(final Object o) {
return this.entries.containsValue(o);
}
@Override
public Iterator<E> iterator() {
return this.entries.values().iterator();
}
@Override
public Object[] toArray() {
return this.entries.values().toArray();
}
@Override
public <T> T[] toArray(final T[] a) {
return this.entries.values().toArray(a);
}
@Override
public boolean add(final E e) {
if (this.entries.containsKey(e)) {
return false;
}
this.entries.put(e.getName(), e);
return true;
}
@Override
public boolean remove(final Object o) {
return this.entries.values().remove(o);
}
@Override
public boolean containsAll(final Collection<?> c) {
return this.entries.values().containsAll(c);
}
@Override
public boolean addAll(final Collection<? extends E> c) {
return c.stream().map(e -> add(e)).reduce(false, (r, s) -> r || s);
}
@Override
public boolean removeAll(final Collection<?> c) {
return this.entries.values().removeAll(c);
}
@Override
public boolean retainAll(final Collection<?> c) {
return this.entries.values().retainAll(c);
}
@Override
public void clear() {
this.entries.clear();
}
public E getByName(final String name) {
return this.entries.get(name);
}
public boolean containsByName(final Object o) {
return this.entries.containsKey(o);
}
public boolean removeByName(final Object o) {
return this.entries.keySet().remove(o);
}
public boolean containsAllByName(final Collection<?> c) {
return this.entries.keySet().containsAll(c);
}
public boolean removeAllByName(final Collection<?> c) {
return this.entries.keySet().removeAll(c);
}
public boolean retainAllByName(final Collection<?> c) {
return this.entries.keySet().retainAll(c);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment