/** * {@inheritDoc} * * @throws NullPointerException * if the wrapped array was <code>null</code>. */ @Override public boolean contains(Object o) { // Will make the method fail if array is null. if (size() < 1) { return false; } if (o instanceof Byte) { return Bytes.contains(array, ((Byte) o).byteValue()); } return false; }
/** * {@inheritDoc} * * @throws NullPointerException * if the wrapped array was <code>null</code>. */ @Override public int indexOf(Object o) { // Will make the method fail if array is null. if (size() < 1) { return -1; } if (o instanceof Byte) { return Bytes.indexOf(array, ((Byte) o).byteValue()); } return -1; }
/** * {@inheritDoc} * * @throws NullPointerException * if the wrapped array was <code>null</code>. */ @Override public int lastIndexOf(Object o) { // Will make the method fail if array is null. if (size() < 1) { return -1; } if (o instanceof Byte) { return Bytes.lastIndexOf(array, ((Byte) o).byteValue()); } return -1; }