Results 1 to 4 of 4
- 09-23-2010, 12:19 PM #1
Member
- Join Date
- Sep 2010
- Posts
- 22
- Rep Power
- 0
Setting values from One Enum type to another enum type.
Hi,
Can you please let me know how to set value of one class/interface enum value to another class/interface enum value.
Here is the requirement:
Enum A - 1, 2,3, 4,
Enum B- 11,22,33,44
Getting Value from Enum A and it has to be assigned to Enum B.
Is there any casting required.
I am seeing error as:
The method setAccountNum(B.Enum) in the type MemberAccount is not
applicable for the arguments (A.Enum)
How to do this casting/assignement??
Thanks,
Raj.
- 09-23-2010, 12:40 PM #2
Member
- Join Date
- Sep 2010
- Posts
- 22
- Rep Power
- 0
B.setAccount(AccountSubTypeEnum.Enum.forString(A.g etAcctType().toString()));
Still best way's are expected...
- 09-23-2010, 01:11 PM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 28
?
You're going to have to give us a proper example that shows your problem, because I didn't understand any of that.
-
Similar Threads
-
enum
By billq in forum New To JavaReplies: 3Last Post: 01-03-2010, 08:38 PM -
using instanceof to get Object type and parent type?
By xcallmejudasx in forum New To JavaReplies: 2Last Post: 11-06-2008, 06:24 PM -
[SOLVED] Cast string type to int type
By GilaMonster in forum New To JavaReplies: 9Last Post: 09-17-2008, 10:43 AM -
passing an enum type as a parameter ??!
By SCS17 in forum New To JavaReplies: 11Last Post: 07-13-2008, 01:44 PM -
Uisng primitive type values as keys for Hashtable
By ravian in forum New To JavaReplies: 3Last Post: 11-21-2007, 10:13 AM
Bookmarks