|
|
|
|||||
|
Java: going from String to Enum Type
In Java:
I have an ice interface that contains enum declarations. Does ICE generate a class/method where I can convert a String of enum value, so that I can assign the converted value to the member variable of the same enum type? Currently I have to do it this way i.e enum EmployeePaidType { salary, hourly }; EmployeePaidType myEmployeePaidType; if( "salary".equals(paidType) ) myEmployeePaidType = EmployeePaidType.salary; else if( "hourly".equals(paidType) ) myEmployeePaidType = EmployeePaidType.hourly; I am using ICE 3.0.1 on Windows XP |
|
|||||
|
It would seem that this should be a standard for the generated code.
Also it would be nice to have the size be public accessible by variable or getter. Last edited by nightnday : 03-21-2006 at 06:24 PM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| encoding error when Ice java client get string from Ice c++ server | casper | Help Center | 1 | 09-16-2005 04:01 AM |
| How to define a variant type? | fengxb | Help Center | 2 | 07-31-2005 11:45 AM |
| problem in mapping string->string[] in C# | teayu | Help Center | 2 | 10-27-2004 12:12 AM |
| libpath failure for icepack server type java-icebox | Tim | Bug Reports | 2 | 06-30-2004 05:40 PM |
| Type id | ganzuoni | Comments | 5 | 07-02-2003 04:09 AM |