/** * Returns the offset for the given key-group. The key-group must be contained in the range. * * @param keyGroup Key-group for which we query the offset. Key-group must be contained in the range. * @return The offset for the given key-group which must be contained in the range. */ public long getKeyGroupOffset(int keyGroup) { return offsets[computeKeyGroupIndex(keyGroup)]; }
/** * Sets the offset for the given key-group. The key-group must be contained in the range. * * @param keyGroup Key-group for which we set the offset. Must be contained in the range. * @param offset Offset for the key-group. */ public void setKeyGroupOffset(int keyGroup, long offset) { offsets[computeKeyGroupIndex(keyGroup)] = offset; }
/** * Sets the offset for the given key-group. The key-group must be contained in the range. * * @param keyGroup Key-group for which we set the offset. Must be contained in the range. * @param offset Offset for the key-group. */ public void setKeyGroupOffset(int keyGroup, long offset) { offsets[computeKeyGroupIndex(keyGroup)] = offset; }
/** * Returns the offset for the given key-group. The key-group must be contained in the range. * * @param keyGroup Key-group for which we query the offset. Key-group must be contained in the range. * @return The offset for the given key-group which must be contained in the range. */ public long getKeyGroupOffset(int keyGroup) { return offsets[computeKeyGroupIndex(keyGroup)]; }
/** * Sets the offset for the given key-group. The key-group must be contained in the range. * * @param keyGroup Key-group for which we set the offset. Must be contained in the range. * @param offset Offset for the key-group. */ public void setKeyGroupOffset(int keyGroup, long offset) { offsets[computeKeyGroupIndex(keyGroup)] = offset; }
/** * Returns the offset for the given key-group. The key-group must be contained in the range. * * @param keyGroup Key-group for which we query the offset. Key-group must be contained in the range. * @return The offset for the given key-group which must be contained in the range. */ public long getKeyGroupOffset(int keyGroup) { return offsets[computeKeyGroupIndex(keyGroup)]; }
/** * Returns the offset for the given key-group. The key-group must be contained in the range. * * @param keyGroup Key-group for which we query the offset. Key-group must be contained in the range. * @return The offset for the given key-group which must be contained in the range. */ public long getKeyGroupOffset(int keyGroup) { return offsets[computeKeyGroupIndex(keyGroup)]; }
/** * Sets the offset for the given key-group. The key-group must be contained in the range. * * @param keyGroup Key-group for which we set the offset. Must be contained in the range. * @param offset Offset for the key-group. */ public void setKeyGroupOffset(int keyGroup, long offset) { offsets[computeKeyGroupIndex(keyGroup)] = offset; }
/** * Returns a key-group range with offsets which is the intersection of the internal key-group range with the given * key-group range. * * @param keyGroupRange Key-group range to intersect with the internal key-group range. * @return The key-group range with offsets for the intersection of the internal key-group range with the given * key-group range. */ public KeyGroupRangeOffsets getIntersection(KeyGroupRange keyGroupRange) { Preconditions.checkNotNull(keyGroupRange); KeyGroupRange intersection = this.keyGroupRange.getIntersection(keyGroupRange); long[] subOffsets = new long[intersection.getNumberOfKeyGroups()]; if(subOffsets.length > 0) { System.arraycopy( offsets, computeKeyGroupIndex(intersection.getStartKeyGroup()), subOffsets, 0, subOffsets.length); } return new KeyGroupRangeOffsets(intersection, subOffsets); }
/** * Returns a key-group range with offsets which is the intersection of the internal key-group range with the given * key-group range. * * @param keyGroupRange Key-group range to intersect with the internal key-group range. * @return The key-group range with offsets for the intersection of the internal key-group range with the given * key-group range. */ public KeyGroupRangeOffsets getIntersection(KeyGroupRange keyGroupRange) { Preconditions.checkNotNull(keyGroupRange); KeyGroupRange intersection = this.keyGroupRange.getIntersection(keyGroupRange); long[] subOffsets = new long[intersection.getNumberOfKeyGroups()]; if(subOffsets.length > 0) { System.arraycopy( offsets, computeKeyGroupIndex(intersection.getStartKeyGroup()), subOffsets, 0, subOffsets.length); } return new KeyGroupRangeOffsets(intersection, subOffsets); }
/** * Returns a key-group range with offsets which is the intersection of the internal key-group range with the given * key-group range. * * @param keyGroupRange Key-group range to intersect with the internal key-group range. * @return The key-group range with offsets for the intersection of the internal key-group range with the given * key-group range. */ public KeyGroupRangeOffsets getIntersection(KeyGroupRange keyGroupRange) { Preconditions.checkNotNull(keyGroupRange); KeyGroupRange intersection = this.keyGroupRange.getIntersection(keyGroupRange); long[] subOffsets = new long[intersection.getNumberOfKeyGroups()]; if(subOffsets.length > 0) { System.arraycopy( offsets, computeKeyGroupIndex(intersection.getStartKeyGroup()), subOffsets, 0, subOffsets.length); } return new KeyGroupRangeOffsets(intersection, subOffsets); }
/** * Returns a key-group range with offsets which is the intersection of the internal key-group range with the given * key-group range. * * @param keyGroupRange Key-group range to intersect with the internal key-group range. * @return The key-group range with offsets for the intersection of the internal key-group range with the given * key-group range. */ public KeyGroupRangeOffsets getIntersection(KeyGroupRange keyGroupRange) { Preconditions.checkNotNull(keyGroupRange); KeyGroupRange intersection = this.keyGroupRange.getIntersection(keyGroupRange); long[] subOffsets = new long[intersection.getNumberOfKeyGroups()]; if(subOffsets.length > 0) { System.arraycopy( offsets, computeKeyGroupIndex(intersection.getStartKeyGroup()), subOffsets, 0, subOffsets.length); } return new KeyGroupRangeOffsets(intersection, subOffsets); }