public int size() { return c.size(); } public boolean isEmpty() { return c.isEmpty(); }
public int size() { synchronized( mutex ) { return c.size(); } } public boolean isEmpty() {
/** * Creates a new <code>TLongArrayList</code> instance that contains * a copy of the collection passed to us. * * @param collection the collection to copy */ public TLongArrayList ( TLongCollection collection ) { this( collection.size() ); addAll( collection ); }
/** * Creates a new <code>TLongHashSet</code> instance that is a copy * of the existing set. * * @param collection a <tt>TLongSet</tt> that will be duplicated. */ public TLongHashSet( TLongCollection collection ) { this( Math.max( collection.size(), DEFAULT_CAPACITY ) ); if ( collection instanceof TLongHashSet ) { TLongHashSet hashset = ( TLongHashSet ) collection; this._loadFactor = hashset._loadFactor; this.no_entry_value = hashset.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( long ) 0 ) { Arrays.fill( _set, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } addAll( collection ); }
@Override public int size() { synchronized( mutex ) { return c.size(); } } @Override
public int size() { synchronized( mutex ) { return c.size(); } } public boolean isEmpty() {
@Override public int size() { int size = 0; for(TLongCollection c : collections) size += c.size(); return size; }
public int size() { return c.size(); } public boolean isEmpty() { return c.isEmpty(); }
public int size() { synchronized( mutex ) { return c.size(); } } public boolean isEmpty() {
public int size() { synchronized( mutex ) { return c.size(); } } public boolean isEmpty() {
public int size() { return c.size(); } public boolean isEmpty() { return c.isEmpty(); }
@Override public int size() { return c.size(); } @Override
public int size() { return c.size(); } public boolean isEmpty() { return c.isEmpty(); }
/** * Creates a new <code>TLongArrayList</code> instance that contains * a copy of the collection passed to us. * * @param collection the collection to copy */ public TLongArrayList ( TLongCollection collection ) { this( collection.size() ); addAll( collection ); }
/** * Creates a new <code>TLongArrayList</code> instance that contains * a copy of the collection passed to us. * * @param collection the collection to copy */ public TLongArrayList ( TLongCollection collection ) { this( collection.size() ); addAll( collection ); }
/** * Creates a new <code>TLongArrayList</code> instance that contains * a copy of the collection passed to us. * * @param collection the collection to copy */ public TLongArrayList ( TLongCollection collection ) { this( collection.size() ); addAll( collection ); }
/** * Creates a new <code>TLongArrayList</code> instance that contains * a copy of the collection passed to us. * * @param collection the collection to copy */ public TLongArrayList ( TLongCollection collection ) { this( collection.size() ); addAll( collection ); }
/** * Creates a new <code>TLongHashSet</code> instance that is a copy * of the existing set. * * @param collection a <tt>TLongSet</tt> that will be duplicated. */ public TLongHashSet( TLongCollection collection ) { this( Math.max( collection.size(), DEFAULT_CAPACITY ) ); if ( collection instanceof TLongHashSet ) { TLongHashSet hashset = ( TLongHashSet ) collection; this._loadFactor = hashset._loadFactor; this.no_entry_value = hashset.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( long ) 0 ) { Arrays.fill( _set, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } addAll( collection ); }
/** * Creates a new <code>TLongHashSet</code> instance that is a copy * of the existing set. * * @param collection a <tt>TLongSet</tt> that will be duplicated. */ public TLongHashSet( TLongCollection collection ) { this( Math.max( collection.size(), DEFAULT_CAPACITY ) ); if ( collection instanceof TLongHashSet ) { TLongHashSet hashset = ( TLongHashSet ) collection; this._loadFactor = hashset._loadFactor; this.no_entry_value = hashset.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( long ) 0 ) { Arrays.fill( _set, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } addAll( collection ); }
/** * Creates a new <code>TLongHashSet</code> instance that is a copy * of the existing set. * * @param collection a <tt>TLongSet</tt> that will be duplicated. */ public TLongHashSet( TLongCollection collection ) { this( Math.max( collection.size(), DEFAULT_CAPACITY ) ); if ( collection instanceof TLongHashSet ) { TLongHashSet hashset = ( TLongHashSet ) collection; this._loadFactor = hashset._loadFactor; this.no_entry_value = hashset.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( long ) 0 ) { Arrays.fill( _set, this.no_entry_value ); } setUp( saturatedCast( fastCeil( DEFAULT_CAPACITY / (double) _loadFactor ) ) ); } addAll( collection ); }