Class Enum needs a function like Enum<E> getEnumFor(int)

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: 6
    • Component/s: core-libs
    • x86
    • windows_xp

      A DESCRIPTION OF THE REQUEST :
       
      one needs a function that can translate from a <int> into the particular enum value...


      JUSTIFICATION :
      when one is developing one the wire protocols... one needs to be able to translate from a one the wire <int> back to a enum value... currently the only way to do that is to have
      a switch statement

      switch( aValue )
        {
         case 0:
             {
             theENUM = ENUM_0;
              break;
             }// end case 0

      one has to do that for every Enum which makes them hard to work with...
      ###@###.### 2005-03-01 11:53:22 GMT

            Assignee:
            Unassigned
            Reporter:
            Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: