
org.nameapi.client.services.nameparser.NameParserResult Maven / Gradle / Ivy
package org.nameapi.client.services.nameparser;
import com.google.common.base.Optional;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.nameapi.ontology5.cremalang.annotation.Immutable;
import java.util.List;
/**
*/
@Immutable
public class NameParserResult {
@NotNull
private final Optional bestMatch;
@NotNull
private final List matches;
private final int shortestItemCount;
public NameParserResult(@Nullable Match bestMatch, @NotNull List matches, int shortestItemCount) {
this.bestMatch = Optional.fromNullable(bestMatch);
this.matches = matches;
this.shortestItemCount = shortestItemCount;
}
@NotNull
public Optional getBestMatch() {
return bestMatch;
}
@NotNull
public List getMatches() {
return matches;
}
public int getShortestItemCount() {
return shortestItemCount;
}
@Override
public String toString() {
return "ParserResult{" +
"bestMatch=" + bestMatch +
", matches=" + matches +
", shortestItemCount=" + shortestItemCount +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy