9 Replies Latest reply on Aug 12, 2010 12:03 PM by Kayaman

    Vector generics with Lotus Notes View


      I have a problem with this code:
        * db = lotus.domino.Database
        * View is from lotus.domino.View
        * /
      List <View> allviews = new ArrayList<View>();//1
      Vector <View> views = new Vector<View>(); //2
      views = db.getViews();//3
      for (Enumeration <View> e = views.elements();e.hasMoreElements();){//4
      At line 3 I get the well-known warning: "Type safety: the expression of type Vector needs unchecked conversion to conform to Vector<View>". I read about generics, but or i dont understand or ist not possible in this case without warning. Does anybody know how i put the Vector that returns from db.getViews() into the Vector<View> views?


      Edited by: chris211789 on Aug 12, 2010 1:22 AM
      db is not a Document but a Database

      Edited by: chris211789 on Aug 12, 2010 1:23 AM