@Test public void testRemove() { Parameter p = new Parameter("parameter"); ParameterValue pv1 = new ParameterValue(p); pv1.setStringValue("pv1"); ParameterValue pv2 = new ParameterValue(p); pv2.setStringValue("pv2"); ParameterValueList pvlist = new ParameterValueList(); pvlist.add(pv1); assertEquals(1, pvlist.getSize()); assertEquals(pv1, pvlist.removeFirst(p)); assertEquals(0, pvlist.getSize()); pvlist.add(pv1); assertEquals(pv1, pvlist.removeLast(p)); assertEquals(0, pvlist.getSize()); pvlist.add(pv1); pvlist.add(pv2); assertEquals(pv1, pvlist.removeFirst(p)); assertEquals(1, pvlist.getSize()); assertEquals(pv2, pvlist.getLastInserted(p)); pvlist.add(pv1); assertEquals(pv1, pvlist.removeLast(p)); assertEquals(1, pvlist.getSize()); assertEquals(pv2, pvlist.getLastInserted(p)); assertEquals(pv2, pvlist.removeLast(p)); assertEquals(0, pvlist.getSize()); }
@Override public boolean remove(Object o) { throw new UnsupportedOperationException(); }
ParameterValueList implements Collection<ParameterValue> { @Override public boolean remove(Object o) { throw new UnsupportedOperationException(); } }
ParameterValueList implements Collection<ParameterValue> { @Override public boolean remove(Object o) { throw new UnsupportedOperationException(); } ParameterValueList();  ParameterValueList(Collection<ParameterValue> pvs);   ParameterValueList(int capacity, Collection<ParameterValue> pvs); }
ParameterValueList implements Collection<ParameterValue> { @Override public boolean remove(Object o) { throw new UnsupportedOperationException(); } ParameterValueList();  ParameterValueList(Collection<ParameterValue> pvs);   ParameterValueList(int capacity, Collection<ParameterValue> pvs); @Override boolean add(ParameterValue pv); int count(Parameter p); int getSize(); ParameterValue getLastInserted(Parameter p); ParameterValue getFirstInserted(Parameter p); void forEach(Parameter p, Consumer<ParameterValue> action); ParameterValue removeLast(Parameter p); ParameterValue removeFirst(Parameter p); @Override Iterator<ParameterValue> iterator(); @Override boolean addAll(Collection<? extends ParameterValue> c); @Override void clear(); @Override boolean contains(Object o); @Override boolean containsAll(Collection<?> c); @Override boolean isEmpty(); @Override boolean remove(Object o); @Override boolean removeAll(Collection<?> c); @Override boolean retainAll(Collection<?> c); @Override int size(); @Override Object[] toArray(); @Override T[] toArray(T[] a); String toString(); }
ParameterValueList implements Collection<ParameterValue> { @Override public boolean remove(Object o) { throw new UnsupportedOperationException(); } ParameterValueList();  ParameterValueList(Collection<ParameterValue> pvs);   ParameterValueList(int capacity, Collection<ParameterValue> pvs); @Override boolean add(ParameterValue pv); int count(Parameter p); int getSize(); ParameterValue getLastInserted(Parameter p); ParameterValue getFirstInserted(Parameter p); void forEach(Parameter p, Consumer<ParameterValue> action); ParameterValue removeLast(Parameter p); ParameterValue removeFirst(Parameter p); @Override Iterator<ParameterValue> iterator(); @Override boolean addAll(Collection<? extends ParameterValue> c); @Override void clear(); @Override boolean contains(Object o); @Override boolean containsAll(Collection<?> c); @Override boolean isEmpty(); @Override boolean remove(Object o); @Override boolean removeAll(Collection<?> c); @Override boolean retainAll(Collection<?> c); @Override int size(); @Override Object[] toArray(); @Override T[] toArray(T[] a); String toString();  }