summaryrefslogtreecommitdiffstats
path: root/linguistics/src/main/java/com/yahoo/language/process/TokenType.java
diff options
context:
space:
mode:
Diffstat (limited to 'linguistics/src/main/java/com/yahoo/language/process/TokenType.java')
-rw-r--r--linguistics/src/main/java/com/yahoo/language/process/TokenType.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/linguistics/src/main/java/com/yahoo/language/process/TokenType.java b/linguistics/src/main/java/com/yahoo/language/process/TokenType.java
index 14c7e9bc144..6c3e0c2ab36 100644
--- a/linguistics/src/main/java/com/yahoo/language/process/TokenType.java
+++ b/linguistics/src/main/java/com/yahoo/language/process/TokenType.java
@@ -14,6 +14,7 @@ public enum TokenType {
SYMBOL(3),
ALPHABETIC(4),
NUMERIC(5),
+ INDEXABLE_SYMBOL(6),
MARKER(255);
private final int value;
@@ -34,10 +35,10 @@ public enum TokenType {
* @return whether this type of token can be indexed
*/
public boolean isIndexable() {
- switch (this) {
- case ALPHABETIC: case NUMERIC: return true;
- default: return false;
- }
+ return switch (this) {
+ case ALPHABETIC, NUMERIC, INDEXABLE_SYMBOL -> true;
+ default -> false;
+ };
}
/** Translates this from the int code representation returned from {@link #getValue} */