public int hashCode() { int hashCode = 1; Iterator it = iterator(); while (it.hasNext()) { Object obj = it.next(); hashCode = 31 * hashCode + (obj == null ? 0 : obj.hashCode()); } return hashCode; }
public boolean removeAll(Collection coll) { boolean modified = false; Iterator it = iterator(); while (it.hasNext()) { if (coll.contains(it.next())) { it.remove(); modified = true; } } return modified; }
public boolean retainAll(Collection coll) { boolean modified = false; Iterator it = iterator(); while (it.hasNext()) { if (coll.contains(it.next()) == false) { it.remove(); modified = true; } } return modified; }
public int hashCode() { int hashCode = 1; Iterator it = iterator(); while (it.hasNext()) { Object obj = it.next(); hashCode = 31 * hashCode + (obj == null ? 0 : obj.hashCode()); } return hashCode; }
public boolean removeAll(Collection coll) { boolean modified = false; Iterator it = iterator(); while (it.hasNext()) { if (coll.contains(it.next())) { it.remove(); modified = true; } } return modified; }
public boolean retainAll(Collection coll) { boolean modified = false; Iterator it = iterator(); while (it.hasNext()) { if (coll.contains(it.next()) == false) { it.remove(); modified = true; } } return modified; }
/** * Serializes the data held in this object to the stream specified. * <p> * The first serializable subclass must call this method from * <code>writeObject</code>. */ protected void doWriteObject(ObjectOutputStream outputStream) throws IOException { // Write the size so we know how many nodes to read back outputStream.writeInt(size()); for (Iterator itr = iterator(); itr.hasNext();) { outputStream.writeObject(itr.next()); } }
/** * Serializes the data held in this object to the stream specified. * <p> * The first serializable subclass must call this method from * <code>writeObject</code>. */ protected void doWriteObject(ObjectOutputStream outputStream) throws IOException { // Write the size so we know how many nodes to read back outputStream.writeInt(size()); for (Iterator itr = iterator(); itr.hasNext();) { outputStream.writeObject(itr.next()); } }
public String toString() { if (size() == 0) { return "[]"; } StringBuffer buf = new StringBuffer(16 * size()); buf.append("["); Iterator it = iterator(); boolean hasNext = it.hasNext(); while (hasNext) { Object value = it.next(); buf.append(value == this ? "(this Collection)" : value); hasNext = it.hasNext(); if (hasNext) { buf.append(", "); } } buf.append("]"); return buf.toString(); }
public String toString() { if (size() == 0) { return "[]"; } StringBuffer buf = new StringBuffer(16 * size()); buf.append("["); Iterator it = iterator(); boolean hasNext = it.hasNext(); while (hasNext) { Object value = it.next(); buf.append(value == this ? "(this Collection)" : value); hasNext = it.hasNext(); if (hasNext) { buf.append(", "); } } buf.append("]"); return buf.toString(); }
public int hashCode() { int hashCode = 1; Iterator it = iterator(); while (it.hasNext()) { Object obj = it.next(); hashCode = 31 * hashCode + (obj == null ? 0 : obj.hashCode()); } return hashCode; }
public int hashCode() { int hashCode = 1; Iterator it = iterator(); while (it.hasNext()) { Object obj = it.next(); hashCode = 31 * hashCode + (obj == null ? 0 : obj.hashCode()); } return hashCode; }
public int hashCode() { int hashCode = 1; Iterator it = iterator(); while (it.hasNext()) { Object obj = it.next(); hashCode = 31 * hashCode + (obj == null ? 0 : obj.hashCode()); } return hashCode; }
public boolean retainAll(Collection coll) { boolean modified = false; Iterator it = iterator(); while (it.hasNext()) { if (coll.contains(it.next()) == false) { it.remove(); modified = true; } } return modified; }
public boolean removeAll(Collection coll) { boolean modified = false; Iterator it = iterator(); while (it.hasNext()) { if (coll.contains(it.next())) { it.remove(); modified = true; } } return modified; }
public boolean retainAll(Collection coll) { boolean modified = false; Iterator it = iterator(); while (it.hasNext()) { if (coll.contains(it.next()) == false) { it.remove(); modified = true; } } return modified; }
public boolean removeAll(Collection coll) { boolean modified = false; Iterator it = iterator(); while (it.hasNext()) { if (coll.contains(it.next())) { it.remove(); modified = true; } } return modified; }
public boolean removeAll(Collection coll) { boolean modified = false; Iterator it = iterator(); while (it.hasNext()) { if (coll.contains(it.next())) { it.remove(); modified = true; } } return modified; }
public boolean retainAll(Collection coll) { boolean modified = false; Iterator it = iterator(); while (it.hasNext()) { if (coll.contains(it.next()) == false) { it.remove(); modified = true; } } return modified; }
/** * Serializes the data held in this object to the stream specified. * <p> * The first serializable subclass must call this method from * <code>writeObject</code>. */ protected void doWriteObject(ObjectOutputStream outputStream) throws IOException { // Write the size so we know how many nodes to read back outputStream.writeInt(size()); for (Iterator itr = iterator(); itr.hasNext();) { outputStream.writeObject(itr.next()); } }