Package java.util

Examples of java.util.AbstractCollection


    /**
     * Implements {@link Map#values()}.
     */
    public Collection values() {
        return new AbstractCollection() {
            // required impl
            public Iterator iterator() {
                return new OrderedIterator(VALUE);
            }

View Full Code Here


    /**
     * Implements {@link Map#values()}.
     */
    public Collection values() {
        return new AbstractCollection() {
            // required impl
            public Iterator iterator() {
                return new OrderedIterator(VALUE);
            }

View Full Code Here

            coll = new GenericJSONArrayList((JSONArray) obj);
        } else if (obj instanceof Collection) {
            coll = (Collection) obj;
        } else {
            final Iterable iter = (Iterable) obj;
            coll = new AbstractCollection() {
                @Override
                public Iterator iterator() {
                    return iter.iterator();
                }
View Full Code Here

     *
     * @return a collection view of the values contained in this map.
     */
    public Collection values() {
        if (values==null) {
            values = new AbstractCollection() {
                public Iterator iterator() {
                    return getHashIterator(VALUES);
                }
                public int size() {
                    return count;
View Full Code Here

  /**
   *  Implements {@link Map#values()}.
   */
  public Collection values() {
    return new AbstractCollection() {
      // required impl
      public Iterator iterator() { return new OrderedIterator(VALUE); }
      public boolean remove(Object value) {
        // do null comparison outside loop so we only need to do it once.  This
        // provides a tighter, more efficient loop at the expense of slight
View Full Code Here

            coll = new GenericJSONArrayList((JSONArray) obj);
        } else if (obj instanceof Collection) {
            coll = (Collection) obj;
        } else {
            final Iterable iter = (Iterable) obj;
            coll = new AbstractCollection() {
                @Override
                public Iterator iterator() {
                    return iter.iterator();
                }
View Full Code Here

/*     */   }
/*     */
/*     */   public Collection values()
/*     */   {
/* 710 */     if (this.values != null) return this.values;
/* 711 */     this.values = new AbstractCollection() {
/*     */       public int size() {
/* 713 */         return ReferenceMap.this.size();
/*     */       }
/*     */
/*     */       public void clear() {
View Full Code Here

/*      */     };
/*      */   }
/*      */
/*      */   public Collection values()
/*      */   {
/*  590 */     return new AbstractCollection()
/*      */     {
/*      */       public Iterator iterator() {
/*  593 */         return new SequencedHashMap.OrderedIterator(SequencedHashMap.this, 1);
/*      */       }
/*      */
View Full Code Here

    /**
     *  Implements {@link Map#values()}.
     */
    public Collection values() {
        return new AbstractCollection() {
            // required impl
            public Iterator iterator() {
                return new OrderedIterator(VALUE);
            }

View Full Code Here

     *
     *  @return a collection view of this map's values.
     */
    public Collection values() {
        if (values != null) return values;
        values = new AbstractCollection()  {
            public int size() {
                return ReferenceMap.this.size();
            }

            public void clear() {
View Full Code Here

TOP

Related Classes of java.util.AbstractCollection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.