Skip to content

Commit

Permalink
refac: update defaultvquery value
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Nov 11, 2023
1 parent ca1338a commit d5ed639
Showing 1 changed file with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,17 @@

import org.eclipse.jnosql.query.grammar.QueryParser;

import java.util.Objects;

/**
* The default implementation of {@link ParamQueryValue}
*/
final class DefaultQueryValue implements ParamQueryValue {

private final String value;
*/ record DefaultQueryValue(String value) implements ParamQueryValue {

DefaultQueryValue(String value) {
this.value = value;
}

@Override
public String get() {
return value;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof DefaultQueryValue that)) {
return false;
}
return Objects.equals(value, that.value);
}

@Override
public int hashCode() {
return Objects.hashCode(value);
}

@Override
public String toString() {
return "@" + value;
Expand Down

0 comments on commit d5ed639

Please sign in to comment.