Skip to content

Commit

Permalink
Change access level for util class and it methods
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Gaievski <[email protected]>
  • Loading branch information
martin-gaievski committed Aug 1, 2023
1 parent 3767707 commit 8936d5d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
/**
* Collection of utility methods for score combination technique classes
*/
public class ScoreCombinationUtil {
class ScoreCombinationUtil {
private static final String PARAM_NAME_WEIGHTS = "weights";

/**
* Get collection of weights based on user provided config
* @param params map of named parameters and their values
* @return collection of weights
*/
protected List<Float> getWeights(final Map<String, Object> params) {
public List<Float> getWeights(final Map<String, Object> params) {
if (Objects.isNull(params) || params.isEmpty()) {
return List.of();
}
Expand All @@ -39,7 +39,7 @@ protected List<Float> getWeights(final Map<String, Object> params) {
* @param actualParams map of parameters in form of name-value
* @param supportedParams collection of parameters that we should validate against, typically that's what is supported by exact technique
*/
protected void validateParams(final Map<String, Object> actualParams, final Set<String> supportedParams) {
public void validateParams(final Map<String, Object> actualParams, final Set<String> supportedParams) {
if (Objects.isNull(actualParams) || actualParams.isEmpty()) {
return;
}
Expand Down Expand Up @@ -74,7 +74,7 @@ protected void validateParams(final Map<String, Object> actualParams, final Set<
* @param indexOfSubQuery 0-based index of sub-query in the Hybrid Search query
* @return weight for sub-query, use one that is set in processor/pipeline definition or 1.0 as default
*/
protected float getWeightForSubQuery(final List<Float> weights, final int indexOfSubQuery) {
public float getWeightForSubQuery(final List<Float> weights, final int indexOfSubQuery) {
return indexOfSubQuery < weights.size() ? weights.get(indexOfSubQuery) : 1.0f;
}
}

0 comments on commit 8936d5d

Please sign in to comment.