![JAR search and dependency download from the Maven repository](/logo.png)
com.code972.hebmorph.DescFlag Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hebmorph-lucene Show documentation
Show all versions of hebmorph-lucene Show documentation
Enabling Hebrew search in Lucene. Part of the HebMorph project, for making Hebrew properly
searchable
package com.code972.hebmorph;
/**
* Created by Egozy on 28/12/2014.
*/
public enum DescFlag {
D_EMPTY,
D_NOUN,
D_VERB,
D_ADJ,
D_PROPER,
D_ACRONYM;
public static DescFlag create(byte val) {
switch (val) {
case 0:
return D_EMPTY;
case 1:
return D_NOUN;
case 2:
return D_VERB;
case 3:
return D_ADJ;
case 4:
return D_PROPER;
case 5:
return D_ACRONYM;
}
throw new IllegalArgumentException();
}
public int getVal() {
switch (this) {
case D_EMPTY:
return 0;
case D_NOUN:
return 1;
case D_VERB:
return 2;
case D_ADJ:
return 3;
case D_PROPER:
return 4;
case D_ACRONYM:
return 5;
}
throw new IllegalArgumentException();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy