次のコードがあるとします。
enum Functions
{
background,clear,colorMode,fill,noFill,noStroke,stroke,applyMatrix,popMatrix,
printMatrix,pushMatrix,resetMatrix,rotate,rotateX,rotateY,rotateZ,scale,shearX,shearY,
translate,ellipseMode,smooth,noSmooth,rectMode,strokeCap,strokeJoin,strokeWeight,arc,ellipse,
line,point,quad,rect,triangle,size,frameRate;
}
switch(Functions.valueOf(f))
{
case background:
//background()
background(random(255),random(255),random(255));
break;
case clear:
//clear()
break;
case colorMode:
//colorMode()
break;
case fill:
//fill()
fill(random(255),random(255),random(255));
break;
case size:
//size()
break;
.....
}
これはほとんどの場合正常に動作しており、他の Enum const でこのエラーがスローされたことはありません。
IllegalArgumentException: No enum const class Functions.size
しかし、何らかの理由で、Functions.size によってこのエラーがスローされることがあります。これが断続的に発生する理由を知っている人はいますか?