Package org.apache.commons.collections.collection

Examples of org.apache.commons.collections.collection.CompositeCollection


    /**
     * @since 3.0
     */
    public Collection<Embeddable> getEmbeddables() {
        CompositeCollection c = new CompositeCollection();
        for (DataMap map : getDataMaps()) {
            c.addComposited(map.getEmbeddables());
        }

        return c;
    }
View Full Code Here


    /**
     * @since 3.0
     */
    public Collection<SQLResult> getResultSets() {
        CompositeCollection c = new CompositeCollection();
        for (DataMap map : getDataMaps()) {
            c.addComposited(map.getResults());
        }

        return c;
    }
View Full Code Here

        return c;
    }

    public Collection<Procedure> getProcedures() {
        CompositeCollection c = new CompositeCollection();
        for (DataMap map : getDataMaps()) {
            c.addComposited(map.getProcedures());
        }

        return c;
    }
View Full Code Here

        return c;
    }

    public Collection<Query> getQueries() {
        CompositeCollection c = new CompositeCollection();
        for (DataMap map : getDataMaps()) {
            c.addComposited(map.getQueries());
        }

        return c;
    }
View Full Code Here

  private final Map<IOFileFilter, Pattern> sometimesSkipPatterns;
  private final ArrayList<Pattern> skipBuffer;

    @SuppressWarnings("unchecked")
    private static <T> Collection<T> unmodifiableComposite(final Collection<T> coll1, final Collection<T> coll2) {
      final CompositeCollection compColl = new CompositeCollection();
      compColl.addComposited(coll1, coll2);
    return Collections.unmodifiableCollection(compColl);
  }
View Full Code Here

     * It does not support the add or <tt>addAll</tt> operations.
     *
     * @return a collection view of the values contained in this map.
     */
    public Collection values() {
        CompositeCollection keys = new CompositeCollection();
        for (int i = this.composite.length - 1; i >= 0; --i) {
            keys.addComposited(this.composite[i].values());
        }
        return keys;
    }
View Full Code Here

     * Returns a {@link LimitedCookieStoreFacade} whose
     * {@link LimitedCookieStoreFacade#getCookies()} method returns only cookies
     * from {@code host} and its parent domains, if applicable.
     */
    public CookieStore cookieStoreFor(String host) {
        CompositeCollection cookieCollection = new CompositeCollection();

        if (InternetDomainName.isValid(host)) {
            InternetDomainName domain = InternetDomainName.from(host);

            while (domain != null) {
                Collection<Cookie> subset = hostSubset(domain.toString());
                cookieCollection.addComposited(subset);

                if (domain.hasParent()) {
                    domain = domain.parent();
                } else {
                    domain = null;
                }
            }
        } else {
            Collection<Cookie> subset = hostSubset(host.toString());
            cookieCollection.addComposited(subset);
        }

        @SuppressWarnings("unchecked")
        List<Cookie> cookieList = new RestrictedCollectionWrappedList<Cookie>(cookieCollection);
        LimitedCookieStoreFacade store = new LimitedCookieStoreFacade(cookieList);
View Full Code Here

/* 421 */     return size;
/*     */   }
/*     */
/*     */   public Collection values()
/*     */   {
/* 438 */     CompositeCollection keys = new CompositeCollection();
/* 439 */     for (int i = this.composite.length - 1; i >= 0; i--) {
/* 440 */       keys.addComposited(this.composite[i].values());
/*     */     }
/* 442 */     return keys;
/*     */   }
View Full Code Here

    private Collection<QueryAxis> allAxes() {
        if (slicerAxis == null) {
            return Arrays.asList(axes);
        } else {
            //noinspection unchecked
            return new CompositeCollection(
                new Collection[] {
                    Collections.singletonList(slicerAxis),
                    Arrays.asList(axes)});
        }
    }
View Full Code Here

    private final Spec<T> notInSpec = new ItemNotInCompositeSpec();
    private final DefaultDomainObjectSet<T> backingSet;

    public static <T> CompositeDomainObjectSet<T> create(Class<T> type, DomainObjectCollection<? extends T>... collections) {
        //noinspection unchecked
        DefaultDomainObjectSet<T> backingSet = new DefaultDomainObjectSet<T>(type, new CompositeCollection());
        CompositeDomainObjectSet<T> out = new CompositeDomainObjectSet<T>(backingSet);
        for (DomainObjectCollection<? extends T> c : collections) {
            out.addCollection(c);
        }
        return out;
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.collection.CompositeCollection

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.