/** {@inheritDoc} */ public boolean addAll( short[] array ) { boolean changed = false; for ( int i = array.length; i-- > 0; ) { if ( add( array[i] ) ) { changed = true; } } return changed; }
@Override public double compare(final SparseShortArray h1, final SparseShortArray h2) { short[] h1v = h1.values(); short[] h2v = h2.values(); TShortHashSet union = new TShortHashSet(h1v); union.addAll(h2v); if (h1v.length != h1.length || h2v.length != h2.length) union.add((short)0); TShortHashSet intersection = new TShortHashSet(h1v); intersection.retainAll(h2v); if (h1v.length != h1.length && h2v.length != h2.length) union.add((short)0); return 1.0 - (((double)intersection.size()) / (double)union.size()); } },
/** {@inheritDoc} */ public boolean addAll( Collection<? extends Short> collection ) { boolean changed = false; for ( Short element : collection ) { short e = element.shortValue(); if ( add( e ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean addAll( TShortCollection collection ) { boolean changed = false; TShortIterator iter = collection.iterator(); while ( iter.hasNext() ) { short element = iter.next(); if ( add( element ) ) { changed = true; } } return changed; }
while ( size-- > 0 ) { short val = in.readShort(); add( val );
/** {@inheritDoc} */ public boolean addAll( short[] array ) { boolean changed = false; for ( int i = array.length; i-- > 0; ) { if ( add( array[i] ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean addAll( short[] array ) { boolean changed = false; for ( int i = array.length; i-- > 0; ) { if ( add( array[i] ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ @Override public boolean addAll( short[] array ) { boolean changed = false; for ( int i = array.length; i-- > 0; ) { if ( add( array[i] ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean addAll( short[] array ) { boolean changed = false; for ( int i = array.length; i-- > 0; ) { if ( add( array[i] ) ) { changed = true; } } return changed; }
public synchronized void addNode(short node) { nodes.add(node); }
public synchronized void addNode(short node) { nodes.add(node); }
/** {@inheritDoc} */ public boolean addAll( Collection<? extends Short> collection ) { boolean changed = false; for ( Short element : collection ) { short e = element.shortValue(); if ( add( e ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ @Override public boolean addAll( Collection<? extends Short> collection ) { boolean changed = false; for ( Short element : collection ) { short e = element.shortValue(); if ( add( e ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean addAll( Collection<? extends Short> collection ) { boolean changed = false; for ( Short element : collection ) { short e = element.shortValue(); if ( add( e ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean addAll( Collection<? extends Short> collection ) { boolean changed = false; for ( Short element : collection ) { short e = element.shortValue(); if ( add( e ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean addAll( TShortCollection collection ) { boolean changed = false; TShortIterator iter = collection.iterator(); while ( iter.hasNext() ) { short element = iter.next(); if ( add( element ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean addAll( TShortCollection collection ) { boolean changed = false; TShortIterator iter = collection.iterator(); while ( iter.hasNext() ) { short element = iter.next(); if ( add( element ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ public boolean addAll( TShortCollection collection ) { boolean changed = false; TShortIterator iter = collection.iterator(); while ( iter.hasNext() ) { short element = iter.next(); if ( add( element ) ) { changed = true; } } return changed; }
/** {@inheritDoc} */ @Override public boolean addAll( TShortCollection collection ) { boolean changed = false; TShortIterator iter = collection.iterator(); while ( iter.hasNext() ) { short element = iter.next(); if ( add( element ) ) { changed = true; } } return changed; }
private int handleMessageGet(Message.GET msg, CacheLine line) throws IrrelevantStateException { if (handleNotOwner(msg, line)) return LINE_NO_CHANGE; relevantStates(line, State.E, State.O); int change = LINE_NO_CHANGE; change |= setState(line, State.O) ? LINE_STATE_CHANGED : 0; line.sharers.add(msg.getNode()); send(Message.PUT(msg, line.id, line.version, readOnly(line.data))); line.rewind(); return change; }