/** * This method should be called prior to adding any component * <code>ByteArray</code> to a composite. * * @param ba The component to add. */ private void addHook(ByteArray ba) { // Check first() is zero, otherwise cursor might not work. // TODO: Remove this restriction? if (ba.first() != 0) { throw new IllegalArgumentException("Cannot add byte array that doesn't start from 0: " + ba.first()); } // Check order. if (order == null) { order = ba.order(); } else if (!order.equals(ba.order())) { throw new IllegalArgumentException("Cannot add byte array with different byte order: " + ba.order()); } }
/** * This method should be called prior to adding any component * <code>ByteArray</code> to a composite. * * @param ba The component to add. */ private void addHook(ByteArray ba) { // Check first() is zero, otherwise cursor might not work. // TODO: Remove this restriction? if (ba.first() != 0) { throw new IllegalArgumentException("Cannot add byte array that doesn't start from 0: " + ba.first()); } // Check order. if (order == null) { order = ba.order(); } else if (!order.equals(ba.order())) { throw new IllegalArgumentException("Cannot add byte array with different byte order: " + ba.order()); } }
/** * This method should be called prior to adding any component * <code>ByteArray</code> to a composite. * * @param ba * The component to add. */ private void addHook( ByteArray ba ) { // Check first() is zero, otherwise cursor might not work. // TODO: Remove this restriction? if ( ba.first() != 0 ) { throw new IllegalArgumentException( "Cannot add byte array that doesn't start from 0: " + ba.first() ); } // Check order. if ( order == null ) { order = ba.order(); } else if ( !order.equals( ba.order() ) ) { throw new IllegalArgumentException( "Cannot add byte array with different byte order: " + ba.order() ); } }
/** * {@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 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 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 ); } } } }
|| !order().equals(otherByteArray.order())) { return false;
|| !order().equals(otherByteArray.order())) { return false;
|| !order().equals( otherByteArray.order() ) )