* representation; null otherwise - if going to be packed as a
* whole object.
*/
- public ObjectId getDeltaBaseId() {
+ public final ObjectId getDeltaBaseId() {
return deltaBase;
}
* pack; null otherwise - if going to be packed as a whole
* object or delta base is specified only as id.
*/
- public ObjectToPack getDeltaBase() {
+ public final ObjectToPack getDeltaBase() {
if (deltaBase instanceof ObjectToPack)
return (ObjectToPack) deltaBase;
return null;
* @return true if object is going to be written as delta; false
* otherwise.
*/
- public boolean isDeltaRepresentation() {
+ public final boolean isDeltaRepresentation() {
return deltaBase != null;
}
*
* @return true if object is already written; false otherwise.
*/
- public boolean isWritten() {
+ public final boolean isWritten() {
return getOffset() != 0;
}
/** @return the type of this object. */
- public int getType() {
+ public final int getType() {
return (flags >> TYPE_SHIFT) & 0x7;
}
* @return true if an existing representation was selected to be reused
* as-is into the pack stream.
*/
- public boolean isReuseAsIs() {
+ public final boolean isReuseAsIs() {
return (flags & REUSE_AS_IS) != 0;
}
}
/** @return the extended flags on this object, in the range [0x0, 0xf]. */
- protected int getExtendedFlags() {
+ protected final int getExtendedFlags() {
return (flags >>> EXT_SHIFT) & EXT_MASK;
}
* the flag mask to test, must be between 0x0 and 0xf.
* @return true if any of the bits matching the mask are non-zero.
*/
- protected boolean isExtendedFlag(int flag) {
+ protected final boolean isExtendedFlag(int flag) {
return (flags & (flag << EXT_SHIFT)) != 0;
}
* @param flag
* the bits to set, must be between 0x0 and 0xf.
*/
- protected void setExtendedFlag(int flag) {
+ protected final void setExtendedFlag(int flag) {
flags |= (flag & EXT_MASK) << EXT_SHIFT;
}
* @param flag
* the bits to clear, must be between 0x0 and 0xf.
*/
- protected void clearExtendedFlag(int flag) {
+ protected final void clearExtendedFlag(int flag) {
flags &= ~((flag & EXT_MASK) << EXT_SHIFT);
}
* additional flag bits to store in the flags field. Due to space
* constraints only values [0x0, 0xf] are permitted.
*/
- protected void setExtendedFlags(int extFlags) {
+ protected final void setExtendedFlags(int extFlags) {
flags = ((extFlags & EXT_MASK) << EXT_SHIFT) | (flags & NON_EXT_MASK);
}