コード例 #1
0
 public static void main(String[] args) {
   String foo = (new ArrayList<String>().get(0));
   History<String> stringHistory = new CopyOfAHistory();
   Object[] objects = new Object[50];
   String[] strings = new String[50];
   objects = strings;
   // objects[3] = new Object();
   List<Object> objectList = new ArrayList();
   List<String> stringList = new ArrayList();
   stringList.add("hello");
   // objectList = stringList;
   // List<String> stringListClone = (new ArrayList()).subList(0,3);
   List<String> stringListClone = (new ArrayList<String>(stringList));
   // List<Point> pointListClone = (new ArrayList<Point>(stringList));
   // History h = historyListClone.get(0);
   // historyListClone.add(new AHistory());
   stringHistory.addElement("James Dean");
   stringHistory.addElement("Joe Doe");
   stringHistory.addElement("Jane Smith");
   stringHistory.addElement("John Smith");
   bus.uigen.ObjectEditor.edit(stringHistory);
 }
コード例 #2
0
 public static void shapeReader(History<? extends Point> history) {
   history.elementAt(0).getX();
 }