/** * @return the first {@link ByteArray} in the list */ public ByteArray getFirst() { if (bas.isEmpty()) { return null; } return bas.getFirst().getByteArray(); }
/** * Returns the first {@link ByteArray} in the list * * @return * The first ByteArray in the list */ public ByteArray getFirst() { if ( bas.isEmpty() ) { return null; } return bas.getFirst().getByteArray(); }
/** * @return the first {@link ByteArray} in the list */ public ByteArray getFirst() { if (bas.isEmpty()) { return null; } return bas.getFirst().getByteArray(); }
/** * {@inheritDoc} */ @Override public void free() { while (!bas.isEmpty()) { Node node = bas.getLast(); node.getByteArray().free(); bas.removeLast(); } }
/** * {@inheritDoc} */ @Override public void order(ByteOrder order) { if (order == null || !order.equals(this.order)) { this.order = order; if (!bas.isEmpty()) { for (Node node = bas.getFirst(); node.hasNextNode(); node = node.getNextNode()) { node.getByteArray().order(order); } } } }
/** * @inheritDoc */ public void free() { while ( !bas.isEmpty() ) { Node node = bas.getLast(); node.getByteArray().free(); bas.removeLast(); } }
/** * @inheritDoc */ public Iterable<IoBuffer> getIoBuffers() { if ( bas.isEmpty() ) { return Collections.emptyList(); } Collection<IoBuffer> result = new ArrayList<>(); Node node = bas.getFirst(); for ( IoBuffer bb : node.getByteArray().getIoBuffers() ) { result.add( bb ); } while ( node.hasNextNode() ) { node = node.getNextNode(); for ( IoBuffer bb : node.getByteArray().getIoBuffers() ) { result.add( bb ); } } return result; }
/** * @inheritDoc */ public void order( ByteOrder order ) { if ( order == null || !order.equals( this.order ) ) { this.order = order; if ( !bas.isEmpty() ) { for ( Node node = bas.getFirst(); node.hasNextNode(); node = node.getNextNode() ) { node.getByteArray().order( order ); } } } }
/** * {@inheritDoc} */ @Override public Iterable<IoBuffer> getIoBuffers() { if (bas.isEmpty()) { return Collections.emptyList(); } Collection<IoBuffer> result = new ArrayList<>(); Node node = bas.getFirst(); for (IoBuffer bb : node.getByteArray().getIoBuffers()) { result.add(bb); } while (node.hasNextNode()) { node = node.getNextNode(); for (IoBuffer bb : node.getByteArray().getIoBuffers()) { result.add(bb); } } return result; }
/** * {@inheritDoc} */ @Override public void order(ByteOrder order) { if (order == null || !order.equals(this.order)) { this.order = order; if (!bas.isEmpty()) { for (Node node = bas.getFirst(); node.hasNextNode(); node = node.getNextNode()) { node.getByteArray().order(order); } } } }
/** * {@inheritDoc} */ @Override public void free() { while (!bas.isEmpty()) { Node node = bas.getLast(); node.getByteArray().free(); bas.removeLast(); } }
/** * {@inheritDoc} */ @Override public Iterable<IoBuffer> getIoBuffers() { if (bas.isEmpty()) { return Collections.emptyList(); } Collection<IoBuffer> result = new ArrayList<>(); Node node = bas.getFirst(); for (IoBuffer bb : node.getByteArray().getIoBuffers()) { result.add(bb); } while (node.hasNextNode()) { node = node.getNextNode(); for (IoBuffer bb : node.getByteArray().getIoBuffers()) { result.add(bb); } } return result; }