public boolean bucketApplies(BucketIndex bucketIndex) { final int[] myIndices = getBucketIndices(); final int[] bucketIndices = bucketIndex.getIndexPath(); for (int i = 0; i < bucketIndices.length; i++) { int ours = myIndices[i]; int theirs = bucketIndices[i]; if (ours != theirs) { return false; } } return true; }