예제 #1
0
 public ListValue<T> concatFront(T other) {
   ListValue<T> list = new ListValue<T>();
   list.add(other);
   Iterator<T> iter = this.m_list.iterator();
   while (iter.hasNext()) list.add(iter.next());
   return list;
 }
예제 #2
0
  public ListValue<T> slice(NumValue a, NumValue b) {
    int i = c_index(a);
    int j = c_index(b);

    ListValue<T> list = new ListValue<T>();

    for (int k = i; k < j; k++) {
      list.add(m_list.get(k));
    }
    return list;
  }