Package java.util

Examples of java.util.AbstractCollection


     * @return a collection view of the values contained in this map.
     */
    public Collection valuesByValue() {

        if (collectionOfValues[VALUE] == null) {
            collectionOfValues[VALUE] = new AbstractCollection() {

                public Iterator iterator() {

                    return new DoubleOrderedMapIterator(VALUE) {

View Full Code Here


     * @return a collection view of the values contained in this map.
     */
    public Collection values() {

        if (collectionOfValues[KEY] == null) {
            collectionOfValues[KEY] = new AbstractCollection() {

                public Iterator iterator() {

                    return new DoubleOrderedMapIterator(KEY) {

View Full Code Here

        list = getList();
        assertEquals("List shouldn't equal String", false, list.equals(""));
        verify();

        final List listForC = Arrays.asList(getFullElements());
        Collection c = new AbstractCollection() {
            public int size() {
                return listForC.size();
            }

            public Iterator iterator() {
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

    /**
     *  Implements {@link Map#values()}.
     */
    public Collection values() {
        return new AbstractCollection() {
            // required impl
            public Iterator iterator() {
                return new OrderedIterator(VALUE);
            }
            public boolean remove(Object value) {
View Full Code Here

      MyCollectionHandler handler = new MyCollectionHandler(aset);
      factory.setHandler(handler);
      factory.setSuperclass(java.util.AbstractCollection.class);
      Class[] sig = {};
      Object[] args = {};
      AbstractCollection proxy = (AbstractCollection) factory.create(sig, args);
      proxy.add("Add");
      assertEquals("size", 1, aset.size());
      proxy.remove("Add");
      assertEquals("size", 0, aset.size());
      assertEquals("isEmpty", true, proxy.isEmpty());
   }
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

   *
   * <p>Note: the performance of the size method of returned collection
   * is no good.
   */
  public Collection getItems() {
    return new AbstractCollection() {
      public int size() {
        return getItemCount();
      }
      public boolean isEmpty() {
        return getChildren().isEmpty();
View Full Code Here

 
  public Grid() {
    init();
  }
  private void init() {
    _heads = new AbstractCollection() {
      public int size() {
        int sz = getChildren().size();
        if (_rows != null) --sz;
        if (_foot != null) --sz;
        if (_paging != null) --sz;
View Full Code Here

  public Tree() {
    init();
  }
  private void init() {
    _selItems = new LinkedHashSet(5);
    _heads = new AbstractCollection() {
      public int size() {
        int sz = getChildren().size();
        if (_treechildren != null) --sz;
        if (_treefoot != null) --sz;
        if (_paging != null) --sz;
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.