Exemplo n.º 1
0
 /** {@inheritDoc} */
 public boolean addAll(Collection<? extends Short> collection) {
   boolean changed = false;
   for (Short element : collection) {
     short e = element.shortValue();
     if (add(e)) {
       changed = true;
     }
   }
   return changed;
 }
Exemplo n.º 2
0
 /** {@inheritDoc} */
 @SuppressWarnings({"SuspiciousMethodCalls"})
 public boolean retainAll(Collection<?> collection) {
   boolean modified = false;
   TShortIterator iter = iterator();
   while (iter.hasNext()) {
     if (!collection.contains(Short.valueOf(iter.next()))) {
       iter.remove();
       modified = true;
     }
   }
   return modified;
 }