Provides a shallow copy of the list
186616
public synchronized List<E> getAll() {
		ArrayList<E> list = new ArrayList<E>();

		for (E element : listElements) {
			if (element != null) {
				list.add(element);
			}
		}

		return list;
	}
377722
function shallowCopy (targetObj, srcObj) {
      each(srcObj, function (prop) {
        targetObj[prop] = srcObj[prop];
      });

      return targetObj;
    }
179846
private void _serializeList(String name, List list, StringBuilder sb, Set<Object> done) throws ConverterException {

	if (useShortcuts) sb.append("[];");
	else sb.append("new Array();");

	ListIterator it = list.listIterator();
	int index = -1;
	while (it.hasNext()) {
	    // if(index!=-1)sb.append(",");
	    index = it.nextIndex();
	    sb.append(name + "[" + index + "]=");
	    _serialize(name + "[" + index + "]", it.next(), sb, done);
	    // sb.append(";");
	}
    }
743386
def getList(x):
    

    t = PL_copy_term_ref(x)
    head = PL_new_term_ref()
    result = []
    while PL_get_list(t, head, t):
        result.append(getTerm(head))
        head = PL_new_term_ref()

    return result
467113
def as_list(self):
        
        self._sanitise()
        l = []
        for name in self.names:
            l.append(getattr(self, name))
        return l
844798
def get_raw(self):
        
        buff = bytearray()
        buff += self.get_obj()
        for i in self.list:
            buff += i.get_raw()
        return buff
661248
private <R> Collection<R> copy(Iterable<R> src) {
        return Lists.newArrayList(src);
    }
697584
def _getNearestMappingIndexList(fromValList, toValList):
    '''
    
    '''

    indexList = []
    for fromTimestamp in fromValList:
        smallestDiff = _getSmallestDifference(toValList, fromTimestamp)
        i = toValList.index(smallestDiff)
        indexList.append(i)

    return indexList
988923
def itemlist(item, sep, suppress_trailing=True):
    """"""
    return condense(item + ZeroOrMore(addspace(sep + item)) + Optional(sep.suppress() if suppress_trailing else sep))
1269162
def _encode_list(self, obj):# do
        """"""

        self._increment_nested_level()

        buffer = []
        for element in obj:
            buffer.append(self._encode(element))

        self._decrement_nested_level()

        return '['+ ','.join(buffer) + ']'
1215310
def lcumsum (inlist):
    
    newlist = copy.deepcopy(inlist)
    for i in range(1,len(newlist)):
        newlist[i] = newlist[i] + newlist[i-1]
    return newlist
936625
private List<String> copyToList(Collection<String> collection) {
 
        if ((collection == null) || collection.isEmpty()) {
            return null;
        }

       return Collections.unmodifiableList(new ArrayList<String>(collection));
    }
614234
def _serialize_input_list(input_value):
        """"""
        input_list = []
        for item in input_value:
            if isinstance(item, list):
                input_list.append(Task._serialize_input_list(item))
            else:
                if isinstance(item, File):
                    item = Task._to_api_file_format(item)
                input_list.append(item)
        return input_list
1150874
def flattencopy(lst):
    """"""
    # modified from
    # http://stackoverflow.com/questions/2158395/flatten-an-irregular-list-of-lists-in-python
    thelist = copy.deepcopy(lst)
    list_is_nested = True
    while list_is_nested:  # outer loop
        keepchecking = False
        atemp = []
        for element in thelist:  # inner loop
            if isinstance(element, list):
                atemp.extend(element)
                keepchecking = True
            else:
                atemp.append(element)
        list_is_nested = keepchecking  # determine if outer loop exits
        thelist = atemp[:]
    return thelist
1358584
function shallowCopyObject (obj) {
  var ret = {};
  for (var i in obj) {
    ret[i] = obj[i];
  }
  return ret;
}
726833
@Inline(value="$2.$3copyOf($1)", imported=ImmutableList.class)
	public static <T> List<T> immutableCopy(List<? extends T> list) {
		return ImmutableList.copyOf(list);
	}
506840
def copy(self):
		""""""
		ret = IndexedDict()
		ret._dict = self._dict.copy()
		ret._list = list(self._list)
		return ret