Java 类org.apache.commons.collections.collection.CompositeCollection 实例源码

项目:Reer    文件:CompositeDomainObjectSet.java   
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;
}
项目:Reer    文件:CompositeDomainObjectSet.java   
@SuppressWarnings({"NullableProblems", "unchecked"})
@Override
public Iterator<T> iterator() {
    CompositeCollection store = getStore();
    if (store.isEmpty()) {
        return Iterators.emptyIterator();
    }
    return new SetIterator();
}
项目:Reer    文件:CompositeDomainObjectSet.java   
@SuppressWarnings("unchecked")
public int size() {
    CompositeCollection store = getStore();
    if (store.isEmpty()) {
        return 0;
    }
    return new HashSet<T>(store).size();
}
项目:mondrian    文件:Query.java   
/**
 * Returns a collection of all axes, including the slicer as the first
 * element, if there is a slicer.
 *
 * @return Collection of all axes including slicer
 */
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)});
    }
}
项目:Reer    文件:CompositeDomainObjectSet.java   
@SuppressWarnings("unchecked")
protected CompositeCollection getStore() {
    return (CompositeCollection) this.backingSet.getStore();
}
项目:Pushjet-Android    文件:CompositeDomainObjectSet.java   
public CompositeDomainObjectSet(Class<T> type) {
    //noinspection unchecked
    super(type, new CompositeCollection());
}
项目:Pushjet-Android    文件:CompositeDomainObjectSet.java   
@SuppressWarnings("unchecked")
protected CompositeCollection getStore() {
    return (CompositeCollection)super.getStore();
}
项目:Pushjet-Android    文件:CompositeDomainObjectSet.java   
public CompositeDomainObjectSet(Class<T> type) {
    //noinspection unchecked
    super(type, new CompositeCollection());
}
项目:Pushjet-Android    文件:CompositeDomainObjectSet.java   
@SuppressWarnings("unchecked")
protected CompositeCollection getStore() {
    return (CompositeCollection)super.getStore();
}