T
Todd
Wojtek,
Thank you!! A valid reason to use the enum. How do you use your
enum? I am confused as to the structure to access the value
unless it's storage is public or you use an accessor. In other
words, is this how you do it?
public enum NonOrdinal
{
RADIUS( 21 ),
DIAMETER( 42 );
NonOrdinal( double value )
{
this.value = value;
}
public double value;
}
or
public enum NonOrdinal
{
RADIUS( 21 ),
DIAMETER( 42 );
NonOrdinal( double value )
{
this.value = value;
}
public double getValue()
{
return value;
}
private double value;
}
or some other way? I know that one must have at
least one enumerated variable declaration in an enum,
and I think that is confusing me some.
Wojtek, I am curious,
Todd
Thank you!! A valid reason to use the enum. How do you use your
enum? I am confused as to the structure to access the value
unless it's storage is public or you use an accessor. In other
words, is this how you do it?
public enum NonOrdinal
{
RADIUS( 21 ),
DIAMETER( 42 );
NonOrdinal( double value )
{
this.value = value;
}
public double value;
}
or
public enum NonOrdinal
{
RADIUS( 21 ),
DIAMETER( 42 );
NonOrdinal( double value )
{
this.value = value;
}
public double getValue()
{
return value;
}
private double value;
}
or some other way? I know that one must have at
least one enumerated variable declaration in an enum,
and I think that is confusing me some.
Wojtek, I am curious,
Todd