Skip to content

Commit

Permalink
Remove final modifiers from methods
Browse files Browse the repository at this point in the history
This allows us to derive an IntegerEncodedValue with a factor for
voltages etc.
  • Loading branch information
Nakaner committed May 15, 2024
1 parent 27bed71 commit 9d17c3f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ boolean isInitialized() {
}

@Override
public final void setInt(boolean reverse, int edgeId, EdgeIntAccess edgeIntAccess, int value) {
public void setInt(boolean reverse, int edgeId, EdgeIntAccess edgeIntAccess, int value) {
checkValue(value);
uncheckedSet(reverse, edgeId, edgeIntAccess, value);
}

private void checkValue(int value) {
protected void checkValue(int value) {
if (!isInitialized())
throw new IllegalStateException("EncodedValue " + getName() + " not initialized");
if (value > maxStorableValue)
Expand All @@ -163,7 +163,7 @@ private void checkValue(int value) {
throw new IllegalArgumentException(name + " value too small for encoding " + value + ", minValue:" + minStorableValue);
}

final void uncheckedSet(boolean reverse, int edgeId, EdgeIntAccess edgeIntAccess, int value) {
final protected void uncheckedSet(boolean reverse, int edgeId, EdgeIntAccess edgeIntAccess, int value) {
if (negateReverseDirection) {
if (reverse) {
reverse = false;
Expand All @@ -188,7 +188,7 @@ final void uncheckedSet(boolean reverse, int edgeId, EdgeIntAccess edgeIntAccess
}

@Override
public final int getInt(boolean reverse, int edgeId, EdgeIntAccess edgeIntAccess) {
public int getInt(boolean reverse, int edgeId, EdgeIntAccess edgeIntAccess) {
int flags;
// if we do not store both directions ignore reverse == true for convenient reading
if (storeTwoDirections && reverse) {
Expand Down

0 comments on commit 9d17c3f

Please sign in to comment.