예제 #1
0
 public Object sublist(Object receiver, int beginIndex, int endIndex) {
   Object result = mutableInstance(receiver);
   OrderedList resultExtension = get(result);
   for (int i = beginIndex; i < endIndex; i++) {
     resultExtension.addElement(result, elementAt(receiver, i));
   }
   return result;
 }
예제 #2
0
 public List toList(Object receiver) {
   OrderedList orderedList = OrderedList.get(receiver);
   int count = orderedList.size(receiver);
   List result = ListUtil.list(count);
   for (int i = 0; i < count; i++) {
     result.add(orderedList.elementAt(receiver, i));
   }
   return result;
 }