Avatar of PearlJamFanatic
PearlJamFanatic
 asked on

passing enum to a method

enum MyEnum1{BUYOPEN, XYZ, ABC};
enum MyEnum2{SCALEOUTTARGET, BCD, EFG};

localDataSeries=getDataSeries();
for (int I=0;i<100;i++){
localDataSeries.setBoolean(i, MyEnum1.BUYOPEN, true);	
localDataSeries.setDouble(i, MyEnum2.SCALEOUTTARGET, 2210.05);
localDataSeries.setInt(i, MyEnum2.BCD, 10);
}
//many more values within localDataseries set using the enums key
.
.
.
}

Open in new window


Is there a way to reset localDataSeries values (that were set using the enum keys) to null in a mass update way? for example like this
 
		 public void resetDataseriesvalues(DataSeries ds, Enum key){
				 for (int i=0;i<key.values().length;i++)
					 for (int j=0;j<ds.size();j++)
					 ds.setValue(j, key.values()[i],null);
			 }

Open in new window

resetDataseriesvalues() is not working.
Java

Avatar of undefined
Last Comment
mccarl

8/22/2022 - Mon
PearlJamFanatic

ASKER
is CEHJ taking a day off? :)
ASKER CERTIFIED SOLUTION
mccarl

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
PearlJamFanatic

ASKER
thx, I havent't tested this yet.
mccarl

You're welcome, let us know if you still have questions!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy