Adds the new key to this enumerated type.
        
        :param      key | <str>
188294
def add(self, key, value=None):
        
        if value is None:
            value = 2 ** (len(self))

        self[key] = value
        setattr(self, key, self[key])
        return value
1246174
private void add(String key, String value) {
        checkCapacity(size + 1);
        keys[size] = key;
        vals[size] = value;
        size++;
    }
433403
def replace_key(self, key, new_key):
        
        heap = self._heap
        position = self._position
        if new_key in self:
            raise KeyError('%s is already in the queue' % repr(new_key))
        pos = position.pop(key)  # raises appropriate KeyError
        position[new_key] = pos
        heap[pos].key = new_key
632940
def set_preshared_key(self, new_key):
        
        if self.data.get('preshared_key'):
            self.update(preshared_key=new_key)
1122246
def add_subkey(self, subkey):
        
        if self.key.lower() == 'atoms' or not self.has_subkey(subkey):
            self.subkeys.append(subkey)
726519
public int add(K key)
    {
        int[] f = get(key);
        if (f == null)
        {
            f = new int[]{1};
            put(key, f);
        }
        else ++f[0];

        return f[0];
    }
1354483
private int insertNewKey(int key) {
        if (check && occupiedCount != keyCount) Kit.codeBug();
        if (check && keyCount == 1 << power) Kit.codeBug();
        int[] keys = this.keys;
        int fraction = key * A;
        int index = fraction >>> (32 - power);
        if (keys[index] != EMPTY) {
            int mask = (1 << power) - 1;
            int step = tableLookupStep(fraction, mask, power);
            int firstIndex = index;
            do {
                if (check && keys[index] == DELETED) Kit.codeBug();
                index = (index + step) & mask;
                if (check && firstIndex == index) Kit.codeBug();
            } while (keys[index] != EMPTY);
        }
        keys[index] = key;
        ++occupiedCount;
        ++keyCount;
        return index;
    }
539940
def initialize_key(self, key):
        
        self.k = key
        self.n = 0
        if self.has_key():
            self.cipher.initialize(key)
1285827
public int addKey(String key) {
        JdkUtils.requireNonNull(key);
        int nextIndex = keys.size();
        final Integer mapIndex = JdkUtils.putIfAbsent(keys, key, nextIndex);
        return mapIndex == null ? nextIndex : mapIndex;
    }
1205662
def key(self, key=""):
    
    params = join_params(self.parameters, {"key": key})

    return self.__class__(**params)
143407
function(key) {
			this._keyMap[key] = this.length;
			this._keys.push(key);
			this.length = this._keys.length;
		}
873265
def add(self, key, value, lang=None):
        
        if not isinstance(value, Literal) and lang is not None:
            value = Literal(value, lang=lang)
        elif not isinstance(value, (BNode, URIRef)):
            value, _type = term._castPythonToLiteral(value)
            if _type is None:
                value = Literal(value)
            else:
                value = Literal(value, datatype=_type)
        self.graph.add((self.asNode(), key, value))
1303116
def index(self, key):
        
        if isinstance(key, int):
            if 0 <= key < len(self.__keys):
                return key
            raise IndexError(key)
        elif isinstance(key, str):
            try:
                return self.__keys.index(key)
            except ValueError:
                raise KeyError(key)
        else:
            raise TypeError(key)
782039
void addNewKey(Object key)
    {
        ensureRoom(buildKeyPosition + 1);
        buildKeys[buildKeyPosition++] = updateFunction.apply(key);
    }
477700
def add(self, key, value):
        
        if not key in self.prefs:
            self.prefs[key] = []
        self.prefs[key].append(value)
965937
def new_key(self, key_name=None, key_type=Key.KEY_REGULAR_FILE):
        
        if key_name == '-':
            return Key(self.name, '-', key_type=Key.KEY_STREAM_WRITABLE)
        else:
            dir_name = os.path.dirname(key_name)
            if dir_name and not os.path.exists(dir_name):
                os.makedirs(dir_name)
            fp = open(key_name, 'wb')
            return Key(self.name, key_name, fp)
85813
def send_key(self, key):
        
        cmd = struct.pack(">BBBBBBH", 4, 1, 0, 0, 0, 0, key)
        self.con.send(cmd)

        cmd = struct.pack(">BBBBBBH", 4, 0, 0, 0, 0, 0, key)
        self.con.send(cmd)