Replaces the current buffer data with the list of bytes in the give {@link gnu.trove.list.TDoubleList} This method arbitrarily creates data for the ByteBuffer regardless of the data type of the
vertex attribute.

@param list to set
352908
public void setData(TDoubleList list) {
        this.buffer = CausticUtil.createByteBuffer(list.size() * DataType.DOUBLE.getByteSize());
        final TDoubleIterator iterator = list.iterator();
        while (iterator.hasNext()) {
            buffer.putDouble(iterator.next());
        }
    }
936006
private static Object saveList(List<String> list) {
        if ((list == null) || list.isEmpty()) {
            return null;
        }

        int size = list.size();

        if (size == 1) {
            return list.get(0);
        }

        return list.toArray(new String[size]);
    }
129368
public String serializeFilterList(List<Filter> list) {
        ObjectMapper om = getObjectMapper();
        try {
            return om.writeValueAsString(new ListWrappers.FilterList(list));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
1100812
protected void appendList(StringBuilder buff, String name, List list) {
    buff.append(',');
    buff.append(name);
    buff.append("=[");
    if (list != null) {
      // Take a copy of the array, to be very sure it doesn't change under us
      Object[] items = list.toArray();
      for (int i = 0; i < items.length; i++) {
        if (i != 0) buff.append(',');
        if (items[i] instanceof byte[]) {
          // Print out the bytes in hex.
          buff.append(HexUtil.toString((byte[])items[i]));
        }
        else {
          // Just use the default toString
          buff.append(items[i]);
        }
      }
    }
    buff.append(']');
  }
}
224677
public static <T> List<T> copy(final List<T> list) {
		if (list == null) {
			return null;
		}

		TypeEnum elementType = null;
		List<T> copy = new ArrayList<T>();
		for (T element : list) {
			T elementCopy = null;
			if (element != null) {
				if (elementType == null) {
					elementType = TypeEnum.dataTypeOf(element.getClass());
				}
				elementCopy = copy(element, elementType);
			}

			copy.add(elementCopy);
		}

		return copy;
	}
457404
public void setData(final List data) {
		// Bean properties to render
		String[] properties = new String[]{"colour", "shape", "animal"};

		simpleTable.setDataModel(new SimpleBeanListTableDataModel(properties, data));
	}
524478
public String serializeDataActionList(List<DataAction> list) {
        ObjectMapper om = getObjectMapper();
        try {
            return om.writeValueAsString(new ListWrappers.DataActionList(list));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
1180894
public void applyTo(List<String> list)
    {
        for(int i = 0; i < list.size(); i++)
            list.set(i, stem(list.get(i)));
    }
489788
public void setList(List<?> list) {
		this.checkNull(list);
		this.list.add(list);
		this.type.add(List.class);
	}
335856
public void setBeanList(final List beanList) {
		RepeaterModel model = getOrCreateComponentModel();
		model.setData(beanList);

		// Clean up any stale data.
		HashSet rowIds = new HashSet(beanList.size());

		for (Object bean : beanList) {
			rowIds.add(getRowId(bean));
		}

		cleanupStaleContexts(rowIds);

		// Clean up cached component IDs
		UIContext uic = UIContextHolder.getCurrent();

		if (uic != null && getRepeatRoot() != null) {
			clearScratchMaps(this);
		}
	}
1113968
protected List<WsByteBuffer> compress(List<WsByteBuffer> list, WsByteBuffer buffer) {
        if (null == buffer) {
            return null;
        }
        int dataSize = buffer.remaining();
        if (0 == dataSize) {
            return list;
        }
        byte[] input = null;
        int initOffset = 0;
        if (buffer.hasArray()) {
            input = buffer.array();
            initOffset = buffer.arrayOffset() + buffer.position();
            buffer.position(buffer.limit());
        } else {
            input = new byte[dataSize];
            buffer.get(input);
        }
        this.deflater.setInput(input, initOffset, dataSize);

        // keep compressing data until we use up the input amount
        int offset = 0;
        while (!this.deflater.needsInput()) {
            int len = this.deflater.deflate(this.buf, offset, this.buf.length - offset);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Compressed amount=" + len + " read=" + this.deflater.getBytesRead() + " written=" + this.deflater.getBytesWritten());
            }
            if (0 == len) {
                break; // out of while
            }
            offset += len;
            if (offset == this.buf.length) {
                list.add(makeBuffer(offset));
                offset = 0;
            }
        }
        // if we generated output, put it into a buffer on the list
        if (0 < offset) {
            list.add(makeBuffer(offset));
        }
        return list;
    }
1029557
public void setCapabilityList(java.util.Collection<String> capabilityList) {
        if (capabilityList == null) {
            this.capabilityList = null;
            return;
        }

        this.capabilityList = new java.util.ArrayList<String>(capabilityList);
    }
59051
public static <T> List<T> immutableListView(List<T> list) {
        if (list instanceof ImmutableList<?>) {
            return list;
        }
        if (list instanceof ArrayList<?>) {
            ArrayList.class.cast(list).trimToSize();
        }
        return Collections.unmodifiableList(list);
    }
886494
public void setDatabaseList(java.util.Collection<Database> databaseList) {
        if (databaseList == null) {
            this.databaseList = null;
            return;
        }

        this.databaseList = new java.util.ArrayList<Database>(databaseList);
    }
391430
public void addAll( List<T> list ) {
		if( list.isEmpty() )
			return;

		Element<T> a = requestNew();
		a.object = list.get(0);

		if( first == null ) {
			first = a;
		} else if( last != null ) {
			last.next = a;
			a.previous = last;
		}

		for (int i = 1; i < list.size(); i++) {
			Element<T> b = requestNew();
			b.object = list.get(i);

			a.next = b;
			b.previous = a;
			a = b;
		}

		last = a;
		size += list.size();
	}
849721
public static <T> List<T> cast(List<?> list) {
    return list == null ? null : new CastingList<T>(list);
  }
228307
public void setList(long now, List<SimpleOrderedMap<Object>> list)
      throws IOException {
    if (action.equals(ComponentCollection.ACTION_LIST)) {
      this.now = now;
      this.list = list;
    } else {
      throw new IOException("not allowed with action '" + action + "'");
    }
  }