コード例 #1
0
 public Object clone() {
   RehabActivityCollection newCol = new RehabActivityCollection();
   RehabActivity item;
   for (int i = 0; i < super.size(); i++) {
     item = this.get(i);
     newCol.add(
         new RehabActivity(
             item.getID(),
             item.getText(),
             item.isActive(),
             item.getParent(),
             item.getImage(),
             item.getColor(),
             item.getOrder()));
   }
   for (int i = 0; i < newCol.size(); i++) {
     item = newCol.get(i);
     if (item.getParent() != null) {
       int parentIndex = this.indexOf(item.getParent());
       if (parentIndex >= 0) item.setParent(newCol.get(parentIndex));
       else item.setParent((RehabActivity) item.getParent().clone());
     }
   }
   return newCol;
 }
コード例 #2
0
 public static RehabActivityCollection buildFromBeanCollection(ims.vo.LookupInstanceBean[] beans) {
   RehabActivityCollection coll = new RehabActivityCollection();
   if (beans == null) return coll;
   for (int x = 0; x < beans.length; x++) {
     coll.add(RehabActivity.buildLookup(beans[x]));
   }
   return coll;
 }
コード例 #3
0
 public static RehabActivityCollection buildFromBeanCollection(java.util.Collection beans) {
   RehabActivityCollection coll = new RehabActivityCollection();
   if (beans == null) return coll;
   java.util.Iterator iter = beans.iterator();
   while (iter.hasNext()) {
     coll.add(RehabActivity.buildLookup((ims.vo.LookupInstanceBean) iter.next()));
   }
   return coll;
 }