Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Aggarwal <[email protected]>
  • Loading branch information
sarthakaggarwal97 committed Sep 3, 2024
1 parent 6a99cea commit abae3bb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ private double scale(Object input) {
}

@Override
public double toDoubleValue(Long value) {
public double toDoubleValue(long value) {
double inverseScalingFactor = 1d / scalingFactor;
return value * inverseScalingFactor;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
public interface FieldValueConverter {

/**
* Converts the given long value to a double value.
* Converts the Lucene representation of the value as a long to an actual double representation
*
* @param value the long value to be converted
* @return the corresponding double value
*/
double toDoubleValue(Long value);
double toDoubleValue(long value);

}
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ public byte[] encodePoint(Number value) {
}

@Override
public double toDoubleValue(Long value) {
return HalfFloatPoint.sortableShortToHalfFloat((short) value.longValue());
public double toDoubleValue(long value) {
return HalfFloatPoint.sortableShortToHalfFloat((short) value);
}

@Override
Expand Down Expand Up @@ -377,8 +377,8 @@ public byte[] encodePoint(Number value) {
}

@Override
public double toDoubleValue(Long value) {
return NumericUtils.sortableIntToFloat((int) value.longValue());
public double toDoubleValue(long value) {
return NumericUtils.sortableIntToFloat((int) value);
}

@Override
Expand Down Expand Up @@ -515,7 +515,7 @@ public byte[] encodePoint(Number value) {
}

@Override
public double toDoubleValue(Long value) {
public double toDoubleValue(long value) {
return NumericUtils.sortableLongToDouble(value);
}

Expand Down Expand Up @@ -652,7 +652,7 @@ public byte[] encodePoint(Number value) {
}

@Override
public double toDoubleValue(Long value) {
public double toDoubleValue(long value) {
byte[] bytes = new byte[8];
NumericUtils.longToSortableBytes(value, bytes, 0);
return NumericUtils.sortableLongToDouble(NumericUtils.sortableBytesToLong(bytes, 0));
Expand Down Expand Up @@ -738,7 +738,7 @@ public byte[] encodePoint(Number value) {
}

@Override
public double toDoubleValue(Long value) {
public double toDoubleValue(long value) {
return (double) value;
}

Expand Down Expand Up @@ -818,7 +818,7 @@ public byte[] encodePoint(Number value) {
}

@Override
public double toDoubleValue(Long value) {
public double toDoubleValue(long value) {
return (double) value;
}

Expand Down Expand Up @@ -994,7 +994,7 @@ public byte[] encodePoint(Number value) {
}

@Override
public double toDoubleValue(Long value) {
public double toDoubleValue(long value) {
return (double) value;
}

Expand Down Expand Up @@ -1126,7 +1126,7 @@ public byte[] encodePoint(Number value) {
}

@Override
public double toDoubleValue(Long value) {
public double toDoubleValue(long value) {
return Numbers.unsignedLongToDouble(value);
}

Expand Down Expand Up @@ -1718,7 +1718,7 @@ public byte[] encodePoint(Number value) {
}

@Override
public double toDoubleValue(Long value) {
public double toDoubleValue(long value) {
return type.toDoubleValue(value);
}
}
Expand Down

0 comments on commit abae3bb

Please sign in to comment.