extracts the int values represented by this attribute from the list and adds them to the setToAppend.
If the int attribute is null, it's ignored.
@param list incoming list
@param setToAppend the set to append to
775820
public MutableIntSet asSet(List<T> list, MutableIntSet setToAppend)
    {
        asSet(list, this, setToAppend);
        return setToAppend;
    }
514149
@Override
    public void setAttribute(String name, List<String> values) {
        for (LocalAccountPersonAttributeImpl attribute : attributes) {
            if (name.equals(attribute.getName())) {
                attribute.setValues(values);
                return;
            }
        }

        attributes.add(new LocalAccountPersonAttributeImpl(name, values));
    }
152789
public void setRangesOnIndexedValues(java.util.Collection<ObjectAttributeRange> rangesOnIndexedValues) {
        if (rangesOnIndexedValues == null) {
            this.rangesOnIndexedValues = null;
            return;
        }

        this.rangesOnIndexedValues = new java.util.ArrayList<ObjectAttributeRange>(rangesOnIndexedValues);
    }
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();
	}
1163997
public static int removeDuplicateNodeList(List<String> list) {

        int originCount = list.size();
        // add elements to all, including duplicates
        HashSet<String> hs = new LinkedHashSet<String>();
        hs.addAll(list);
        list.clear();
        list.addAll(hs);

        return originCount - list.size();
    }
1079138
public void setValueAtIn(Object value, int index, List aList) {
        Object cleanValue = cleanupValue(value);
        while (aList.size() <= index) {
            aList.add(null);
        }
        aList.set(index, cleanValue);
    }
634485
public static void removeFromList(List<String> list, String value) {
        int foundIndex = -1;
        int i = 0;
        for (String id : list) {
            if (id.equalsIgnoreCase(value)) {
                foundIndex = i;
                break;
            }
            i++;
        }
        if (foundIndex != -1) {
            list.remove(foundIndex);
        }
    }
180265
private static void addStringList(CodeBlock.Builder code, List<String> list, String indent) {
    int size = list.size();
    code.add("$T.asList(\n$L", Arrays.class, indent);
    int width = indent.length();
    for (int i = 0; i < size; i++) {
      if (i != 0) {
        code.add(", ");
        width += 2;
      }
      if (width > 80) {
        width = indent.length();
        code.add("\n$L", indent);
      }
      String element = list.get(i);
      code.add("$S", element);
      width += element.length() + 2;
    }
    code.add("\n$L)", indent);
  }
667513
public void add(IntArrayList values) {
        ensureCapacity(size + values.size);
        for (int i=0; i<values.size; i++) {
            this.add(values.elements[i]);
        }
    }
949757
public static <T> void fill(final List<? super T> list, final int fromIndex, final int toIndex, final T val) {
        checkFromToIndex(fromIndex, toIndex, Integer.MAX_VALUE);

        int size = list.size();

        if (size < toIndex) {
            if (fromIndex < size) {
                for (int i = fromIndex; i < size; i++) {
                    list.set(i, val);
                }
            } else {
                for (int i = size; i < fromIndex; i++) {
                    list.add(null);
                }
            }

            for (int i = 0, len = toIndex - list.size(); i < len; i++) {
                list.add(val);
            }
        } else {
            if (toIndex - fromIndex < FILL_THRESHOLD || list instanceof RandomAccess) {
                for (int i = fromIndex; i < toIndex; i++) {
                    list.set(i, val);
                }
            } else {
                final ListIterator<? super T> itr = list.listIterator(fromIndex);

                for (int i = fromIndex; i < toIndex; i++) {
                    itr.next();

                    itr.set(val);
                }
            }
        }
    }
959918
@Override
    public ReferencesBuilder append(final String reference, final int section) {
        return doAppend(Collections.singletonList(new Reference(reference, section)));
    }
141263
public static void addToListIfNotExists(List<String> list, String value) {
        boolean found = false;
        for (String item : list) {
            if (item.equalsIgnoreCase(value)) {
                found = true;
                break;
            }
        }
        if (!found) {
            list.add(value);
        }
    }
591335
public void setData(TShortList list) {
        this.buffer = CausticUtil.createByteBuffer(list.size() * DataType.SHORT.getByteSize());
        final TShortIterator iterator = list.iterator();
        while (iterator.hasNext()) {
            buffer.putShort(iterator.next());
        }
    }
563448
@Override
    public void setValue(int attributeIndex, double d) {
        int index = locateIndex(attributeIndex);
        if (index(index) == attributeIndex) {
            this.attributeValues[index] = d;
        } else {
            // We need to add the value
        }
    }
444578
public static <T> void putAt(List<T> self, int idx, T value) {
        int size = self.size();
        idx = normaliseIndex(idx, size);
        if (idx < size) {
            self.set(idx, value);
        } else {
            while (size < idx) {
                self.add(size++, null);
            }
            self.add(idx, value);
        }
    }
1156559
private void setSelectedItem(final ListBox list, final String item) {
    final int nitems = list.getItemCount();
    for (int i = 0; i < nitems; i++) {
      if (item.equals(list.getValue(i))) {
        list.setSelectedIndex(i);
        return;
      }
    }
  }
738831
public <A extends Appendable> A appendTo(A appendable, Iterable<? extends Entry<?, ? extends Collection<?>>> entries)
			throws IOException {
		//    checkNotNull(appendable);
		Iterator<? extends Entry<?, ? extends Collection<?>>> iterator = entries.iterator();
		if (iterator.hasNext()) {
			Entry<?, ? extends Collection<?>> entry = iterator.next();
			appendable.append(toString(entry.getKey()));
			appendable.append(keyValueSeparator);
			entryJoiner.appendTo(appendable, entry.getValue());
			while (iterator.hasNext()) {
				appendable.append(separator);
				Entry<?, ? extends Collection<?>> e = iterator.next();
				appendable.append(toString(e.getKey()));
				appendable.append(keyValueSeparator);
				entryJoiner.appendTo(appendable, e.getValue());
			}
		}
		return appendable;
	}