@Override public int countUnique() { ByteSet count = new ByteOpenHashSet(3); for (byte next : data) { count.add(next); } return count.size(); }
@Override public BooleanColumn unique() { ByteSet count = new ByteOpenHashSet(3); for (byte next : data) { count.add(next); } ByteArrayList list = new ByteArrayList(count); return new BooleanColumn(name() + " Unique values", list); }
@Override public int countUnique() { ByteSet count = new ByteOpenHashSet(3); for (byte next : data) { count.add(next); } return count.size(); }
@Override public int countUnique() { ByteSet count = new ByteOpenHashSet(3); for (byte next : data) { count.add(next); } return count.size(); }
@Override public BooleanColumn unique() { ByteSet count = new ByteOpenHashSet(3); for (byte next : data) { count.add(next); } ByteArrayList list = new ByteArrayList(count); return new BooleanColumn(name() + " Unique values", list); }
@Override public BooleanColumn unique() { ByteSet count = new ByteOpenHashSet(3); for (byte next : data) { count.add(next); } ByteArrayList list = new ByteArrayList(count); return new BooleanColumn(name() + " Unique values", list); }
/** * Remove all active effects */ public void removeAll() { ByteSet removeEffects = null; for ( Byte2ObjectMap.Entry<Effect> entry : this.effects.byte2ObjectEntrySet() ) { if ( removeEffects == null ) { removeEffects = new ByteOpenHashSet(); } removeEffects.add( entry.getByteKey() ); } if ( removeEffects != null ) { for ( Byte removeEffect : removeEffects ) { removeEffect( removeEffect ); } } }
/** * Update effects (look if we can remove some) * * @param currentTimeMillis time when the tick started * @param dT difference time for a full second */ public void update( long currentTimeMillis, float dT ) { if ( !this.effects.isEmpty() ) { ByteSet removeEffects = null; for ( Byte2ObjectMap.Entry<Effect> entry : this.effects.byte2ObjectEntrySet() ) { if ( currentTimeMillis >= entry.getValue().getRunoutTimer() ) { if ( removeEffects == null ) { removeEffects = new ByteOpenHashSet(); } removeEffects.add( entry.getByteKey() ); } else { entry.getValue().update( currentTimeMillis, dT ); } } if ( removeEffects != null ) { for ( Byte removeEffect : removeEffects ) { removeEffect( removeEffect ); } } } }
subChunkSet.add( (byte) sectionY );