pull/12/head
valoeghese 2020-02-26 20:43:31 +13:00
parent 4c6b1253ff
commit 9e665656f3
2 changed files with 11 additions and 9 deletions

View File

@ -11,15 +11,9 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk-13.0.2+8">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>

View File

@ -26,7 +26,15 @@ public class DataSection implements Iterable<Object>
{ return (double) this.data.get(index); }
public <T extends Enum<?>> T readEnum(int index, T[] values)
{ return values[(int) this.data.get(index)]; }
{
Integer i = (Integer) this.data.get(index);
if (i == null) {
return null;
}
return values[i];
}
public <T extends Enum<T>> T readEnumString(int index, Class<T> type)
{ return Enum.valueOf(type, (String) this.data.get(index)); }