this function will iterate over each list elements
setting the one on key to true an all other on false
@param key String, the key to set as true
@param list Object, the object to search for the key to set to true
@return void
2363
function commutate(key, list) {
    _.each(list, function (v, k, l) {
        if (k === key) {
            l[key] = true
        }
        if (v === true && k !== key) {
            l[k] = false
        }
    })
}
529515
public void setKey(String key) {
        Validate.notNull(key);
        key = key.trim();
        Validate.notEmpty(key); // trimming could potentially make empty, so validate here
        if (parent != null) {
            int i = parent.indexOfKey(this.key);
            if (i != Attributes.NotFound)
                parent.keys[i] = key;
        }
        this.key = key;
    }
678648
public static void intern(List<String> list) {
        if (list == null) {
            return;
        }
        for (int i=0; i<list.size(); i++) {
            String interned = list.get(i);
            if (interned != null) {
                interned = interned.intern();
            }
            list.set(i, interned);
        }
    }
218444
function addKeyToList(list, key, object) {
    for (var i = list.length - 1; i >= 0; i--) {
        if (list[i][key] == object[key]) {
            return false;
        }
    }
    list.push(object);
    return true;
}
55840
public void setData(TFloatList list) {
        this.buffer = CausticUtil.createByteBuffer(list.size() * DataType.FLOAT.getByteSize());
        final TFloatIterator iterator = list.iterator();
        while (iterator.hasNext()) {
            buffer.putFloat(iterator.next());
        }
    }
617240
public static void flip(WsByteBuffer[] list) {
        if (list != null) {
            for (int i = 0; i < list.length; i++) {
                if (list[i] != null) {
                    list[i].flip();
                }
            }
        }
    }
7919
public void put(String name,List list)
    {
        if (list==null || list.size()==0)
        {
            remove(name);
            return;
        }
        
        Object v=list.get(0);
        if (v!=null)
            put(name,v.toString());
        else
            remove(name);
        
        if (list.size()>1)
        {    
            java.util.Iterator iter = list.iterator();
            iter.next();
            while(iter.hasNext())
            {
                v=iter.next();
                if (v!=null)
                    add(name,v.toString());
            }
        }
    }
1228774
public void remove(String key) {
        Map<String, String> map = inheritableThreadLocal.get();
        if (map != null) {
            map.remove(key);
        }
    }
1112052
@JsonIgnore
    public void setAttribute(final String key, final Object value) {
        attributes.put(key, CollectionUtils.toCollection(value, ArrayList.class));
    }
71561
@Override
    public void setListId(String listId) {

        m_hideAction.setListId(listId);
        m_showAction.setListId(listId);
    }
906704
public function setList($list = [])
    {
        if (!is_array($list)) {
            $list = ArrayUtils::iteratorToArray($list);
        }

        $this->list = $list;
    }
1362032
function(map, key, value) {

    var list = [];

    if (map.has(key)) {

      list = map.get(key);

      if (!list) {
        list = [];
      }


    }
    list.push(value);
    map.set(key, list);

}
1180894
public void applyTo(List<String> list)
    {
        for(int i = 0; i < list.size(); i++)
            list.set(i, stem(list.get(i)));
    }
439516
public void setAZList(java.util.Collection<String> aZList) {
        if (aZList == null) {
            this.aZList = null;
            return;
        }

        this.aZList = new com.amazonaws.internal.SdkInternalList<String>(aZList);
    }
846371
public void remove(String key) {
        String processedKey = processKey(key);
        String orderKey = null;

        // removing key set for all positions
        for (int i = 0; i < this.order.size(); i++) {
            orderKey = this.order.get(i);

            if (orderKey != null && orderKey.equals(processedKey) == true) {
                this.order.remove(i);
            }
        }

        this.types.remove(processedKey);
        this.direction.remove(processedKey);
        this.values.remove(processedKey);
    }
119777
public void setIfexistsone(String elementList) {

        if (elementList != null) {
            m_elementList = elementList;
            m_checkall = false;
            m_checknone = false;
        }
    }
944760
public void setListObject(Class<?> listDialog, CmsHtmlList listObject) {

        if (listObject == null) {
            // null object: remove the entry from the map
            getListObjectMap(getSettings()).remove(listDialog.getName());
        } else {
            if ((listObject.getMetadata() != null) && listObject.getMetadata().isVolatile()) {
                listObject.setMetadata(null);
            }
            getListObjectMap(getSettings()).put(listDialog.getName(), listObject);
        }
    }