/** * Returns the next element in the iteration. * * @return the next element in the iteration * @throws java.util.NoSuchElementException if the iteration has no more elements */ @Override public Boolean next() { byte b = iterator.nextByte(); if (b == (byte) 0) { return false; } if (b == (byte) 1) { return true; } return null; } }
public Selection isEqualTo(BooleanColumn other) { Selection results = new BitmapBackedSelection(); int i = 0; ByteIterator booleanIterator = other.byteIterator(); for (byte next : data) { if (next == booleanIterator.nextByte()) { results.add(i); } i++; } return results; }
@Override public int nextInt() { return iterator.nextByte(); } @Override
@Override public double nextDouble() { return iterator.nextByte(); } @Override
@Override public float nextFloat() { return iterator.nextByte(); } @Override
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override default Byte next() { return Byte.valueOf(nextByte()); } /**
@Deprecated @Override public Integer next() { return Integer.valueOf(iterator.nextByte()); } @Override
@Deprecated @Override public Float next() { return Float.valueOf(iterator.nextByte()); } @Override
/** Stores the element returned by an iterator to a given data output. * * @param i an iterator whose output will be written to {@code dataOutput}. * @param dataOutput a filename. */ public static void storeBytes(final ByteIterator i, final DataOutput dataOutput) throws IOException { while(i.hasNext()) dataOutput.writeByte(i.nextByte()); } /** Stores the element returned by an iterator to a file given by a {@link File} object.
/** Stores the element returned by an iterator to a given print stream. * * @param i an iterator whose output will be written to {@code stream}. * @param stream a print stream. */ public static void storeBytes(final ByteIterator i, final PrintStream stream) { while(i.hasNext()) stream.println(i.nextByte()); } /** Stores the element returned by an iterator to a file given by a {@link File} object.
/** Stores the element returned by an iterator to a file given by a {@link File} object. * * @param i an iterator whose output will be written to {@code filename}. * @param file a file. */ public static void storeBytes(final ByteIterator i, final File file) throws IOException { final DataOutputStream dos = new DataOutputStream(new FastBufferedOutputStream(new FileOutputStream(file))); while(i.hasNext()) dos.writeByte(i.nextByte()); dos.close(); } /** Stores the element returned by an iterator to a file given by a pathname.
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { final ByteIterator i = iterator(); s.defaultWriteObject(); for (int j = size; j-- != 0;) s.writeByte(i.nextByte()); }
@Override public byte nextByte() { if (!hasNext()) throw new NoSuchElementException(); byte next = a[lastOffset = offset].nextByte(); advance(); return next; } @Override
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { final ByteIterator i = iterator(); s.defaultWriteObject(); for (int j = size; j-- != 0;) s.writeByte(i.nextByte()); }
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { final ByteIterator i = iterator(); s.defaultWriteObject(); for (int j = size; j-- != 0;) s.writeByte(i.nextByte()); }
/** * Creates a new tree set using elements provided by a type-specific iterator. * * @param i * a type-specific iterator whose elements will fill the set. */ public ByteRBTreeSet(final ByteIterator i) { while (i.hasNext()) add(i.nextByte()); } /**
/** * Creates a new tree set using elements provided by a type-specific iterator. * * @param i * a type-specific iterator whose elements will fill the set. */ public ByteAVLTreeSet(final ByteIterator i) { while (i.hasNext()) add(i.nextByte()); } /**
@Override public boolean addAll(final ByteCollection c) { boolean retVal = false; for (final ByteIterator i = c.iterator(); i.hasNext();) if (add(i.nextByte())) retVal = true; return retVal; } @Override
@Override public boolean removeAll(final ByteCollection c) { boolean retVal = false; for (final ByteIterator i = c.iterator(); i.hasNext();) if (rem(i.nextByte())) retVal = true; return retVal; } @Override
@Override public boolean addAll(int index, final ByteCollection c) { ensureIndex(index); final ByteIterator i = c.iterator(); final boolean retVal = i.hasNext(); while (i.hasNext()) add(index++, i.nextByte()); return retVal; } /**