pull/12/head
parent
4c6b1253ff
commit
9e665656f3
10
.classpath
10
.classpath
|
@ -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>
|
||||
|
|
|
@ -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)); }
|
||||
|
|
Loading…
Reference in New Issue