/** * Creates a new hash set copying a given collection. * * @param c * a {@link Collection} to be copied into the new hash set. * @param f * the load factor. */ public ObjectOpenHashSet(final Collection<? extends K> c, final float f) { this(c.size(), f); addAll(c); } /**
/** * Creates a new hash set copying a given type-specific collection. * * @param c * a type-specific collection to be copied into the new hash set. * @param f * the load factor. */ public ObjectOpenHashSet(final ObjectCollection<? extends K> c, final float f) { this(c.size(), f); addAll(c); } /**
private static Set<String> union( Set<String>[] a ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); return s; }
private static Set<String> union( Set<String>[] a ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); return s; }
private static Set<String> union( Set<String>[] a ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); return s; }
private static Set<String> union( Set<String>[] a ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); return s; }
private Set<String> checkUnion( Set<String>[] a, String operator ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); if ( s.size() == 1 ) return s; errorMessage = "The " + operator + " operator requires subqueries on the same index"; return null; }
/** * @return the union of two sets. The maxSize is the larger of the two. If one * of them allow for unbounded size (maxSize = 0) then so does the union. */ DistinctStrings union(final DistinctStrings otherSet) { ObjectOpenHashSet<String> hash = new ObjectOpenHashSet<String>( Math.max(this.uniqueStrings.size(), otherSet.uniqueStrings.size())); hash.addAll(this.uniqueStrings); hash.addAll(otherSet.uniqueStrings); return new DistinctStrings(hash); }
private Set<String> checkUnion( Set<String>[] a, String operator ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); if ( s.size() == 1 ) return s; errorMessage = "The " + operator + " operator requires subqueries on the same index"; return null; }
private Set<String> checkUnion( Set<String>[] a, String operator ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); if ( s.size() == 1 ) return s; errorMessage = "The " + operator + " operator requires subqueries on the same index"; return null; }
private Set<String> checkUnion( Set<String>[] a, String operator ) { ObjectOpenHashSet<String> s = new ObjectOpenHashSet<String>(); for( Set<String> t: a ) s.addAll( t ); if ( s.size() == 1 ) return s; errorMessage = "The " + operator + " operator requires subqueries on the same index"; return null; }