Browse Source

Mark DeltaWindowEntry methods final

This class and all of its methods are only package visible.
Clarify the methods as final for the benefit of the JIT to
inline trivial code.

Change-Id: I078841f9900dbf299fbe6abf2599f0208ae96856
stable-3.0
Shawn Pearce 12 years ago
parent
commit
4db695c1c6
  1. 12
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaWindowEntry.java

12
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaWindowEntry.java

@ -43,7 +43,7 @@
package org.eclipse.jgit.internal.storage.pack; package org.eclipse.jgit.internal.storage.pack;
class DeltaWindowEntry { final class DeltaWindowEntry {
ObjectToPack object; ObjectToPack object;
/** Complete contents of this object. Lazily loaded. */ /** Complete contents of this object. Lazily loaded. */
@ -52,29 +52,29 @@ class DeltaWindowEntry {
/** Index of this object's content, to encode other deltas. Lazily loaded. */ /** Index of this object's content, to encode other deltas. Lazily loaded. */
DeltaIndex index; DeltaIndex index;
void set(ObjectToPack object) { final void set(ObjectToPack object) {
this.object = object; this.object = object;
this.index = null; this.index = null;
this.buffer = null; this.buffer = null;
} }
/** @return current delta chain depth of this object. */ /** @return current delta chain depth of this object. */
int depth() { final int depth() {
return object.getDeltaDepth(); return object.getDeltaDepth();
} }
/** @return type of the object in this window entry. */ /** @return type of the object in this window entry. */
int type() { final int type() {
return object.getType(); return object.getType();
} }
/** @return estimated unpacked size of the object, in bytes . */ /** @return estimated unpacked size of the object, in bytes . */
int size() { final int size() {
return object.getWeight(); return object.getWeight();
} }
/** @return true if there is no object stored in this entry. */ /** @return true if there is no object stored in this entry. */
boolean empty() { final boolean empty() {
return object == null; return object == null;
} }
} }

Loading…
Cancel
Save