Creates a JWKSet object using the given values.

@return JWKSet
514771
public static function createFromKeyData(array $data): self
    {
        if (!\array_key_exists('keys', $data) || !\is_array($data['keys'])) {
            throw new \InvalidArgumentException('Invalid data.');
        }

        $keys = [];
        foreach ($data['keys'] as $key) {
            $jwk = JWK::create($key);
            if ($jwk->has('kid')) {
                $keys[$jwk->get('kid')] = $jwk;

                continue;
            }
            $keys[] = $jwk;
        }

        return new self($keys);
    }
270735
public static Value.Builder makeValue(Iterable<Value> values) {
    return Value.newBuilder().setArrayValue(ArrayValue.newBuilder().addAllValues(values));
  }
242982
public @Nonnull JsonBuilder putArray(String key, @Nonnull Number... values) {
        JsonArray jjArray = new JsonArray();
        for (Number number : values) {
            jjArray.add(primitive(number));
        }
        object.put(key, jjArray);
        return this;
    }
1051269
public static <T> Set<T> newSet(T... values) {
    Set<T> set = new HashSet<>(values.length);
    Collections.addAll(set, values);
    return set;
  }
108178
public static function createOKPKey(string $curve, array $values = []): JWK
    {
        switch ($curve) {
            case 'X25519':
                $keyPair = \sodium_crypto_box_keypair();
                $secret = \sodium_crypto_box_secretkey($keyPair);
                $x = \sodium_crypto_box_publickey($keyPair);

                break;
            case 'Ed25519':
                $keyPair = \sodium_crypto_sign_keypair();
                $secret = \sodium_crypto_sign_secretkey($keyPair);
                $x = \sodium_crypto_sign_publickey($keyPair);

                break;
            default:
                throw new InvalidArgumentException(\sprintf('Unsupported "%s" curve', $curve));
        }
        $secretLength = mb_strlen($secret, '8bit');
        $d = mb_substr($secret, 0, -$secretLength / 2, '8bit');

        $values = \array_merge(
            $values,
            [
                'kty' => 'OKP',
                'crv' => $curve,
                'd' => Base64Url::encode($d),
                'x' => Base64Url::encode($x),
            ]
        );

        return new JWK($values);
    }
700175
public final Set<K> keySet() {
	return new AbstractSet<K>() {
	    public Iterator<K> iterator() {
		final Iterator<Map.Entry<K,V>> ite = entryIterator();
		return new Iterator<K>() {
		    public boolean hasNext() { return ite.hasNext(); }
		    public void    remove()  { ite.remove(); }
		    public K       next()    { return ite.next().getKey(); }
		};
	    }
	    public int size() {
		return size;
	    }
	};
    }
1040012
public Set<String> keySet(){
		HashSet<String> set=new HashSet<String>();
		Iterator<String> keys=keys();
		while(keys.hasNext()){
			set.add(keys.next());
		}
		return set;
	}
993095
public function keys()
    {
        $count     = $this->count()->toNative();
        $keysArray = new \SplFixedArray($count);

        foreach ($this->items as $key => $item) {
            $keysArray->offsetSet($key, $item->getKey());
        }

        return new Collection($keysArray);
    }
754054
public function with(JWK $jwk): self
    {
        $clone = clone $this;

        if ($jwk->has('kid')) {
            $clone->keys[$jwk->get('kid')] = $jwk;
        } else {
            $clone->keys[] = $jwk;
        }

        return $clone;
    }
137851
public function keys(): Set
    {
        $key = function($pair) {
            return $pair->key;
        };

        return new Set(array_map($key, $this->pairs));
    }
890369
public function setValue($values = [])
    {
        $this->initializeElements();

        foreach ($this->getElements() as $element) {
            $element->setValue(false);
        }

        if ($values instanceof Collection) {
            foreach ($values as $value) {
                $id = $value->getId();
                $this->getElement($id)->setValue(true);
            }
        } else {
            foreach ((array)$values as $key => $value) {
                $this->getElement($key)->setValue(true);
            }
        }

        return $this;
    }
648490
public static function create($values = null) {
        if ($values === null) {
            $values = array_values(static::constants());
        }

        return EnumHelper::create(static::typeName(), $values);
    }
1275149
static function arraySet(&$var, $key, $val) {
        $toks = explode('.', $key);
        
        for ($i = 0; $i < count($toks); $i++) {
            $var = &$var[$toks[$i]];
        }
        
        $var = $val;
    }
1211280
public function setValues($values=array()) {
		return $this->_addOrSetValues($values, function(HtmlTR $row,$_values){$row->setValues($_values);});
	}
1184048
public String encode(String... values) {
    ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
    int i = 0;
    for (String value : values) {
      builder.put("$" + i++, value);
    }
    // We will get an error if there are named bindings which are not reached by values.
    return instantiate(builder.build());
  }
72161
public static <T> Set<T> set(T... values) {
        return new HashSet<T>(Arrays.asList(values));
    }
336590
public static function create()
	{
		switch (func_num_args()) {
			case 0:
				return new EnumValueDescriptorProto();
			case 1:
				return new EnumValueDescriptorProto(func_get_arg(0));
			case 2:
				return new EnumValueDescriptorProto(func_get_arg(0), func_get_arg(1));
			case 3:
				return new EnumValueDescriptorProto(func_get_arg(0), func_get_arg(1), func_get_arg(2));
			case 4:
				return new EnumValueDescriptorProto(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3));
			case 5:
				return new EnumValueDescriptorProto(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4));
			case 6:
				return new EnumValueDescriptorProto(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5));
			case 7:
				return new EnumValueDescriptorProto(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5), func_get_arg(6));
			case 8:
				return new EnumValueDescriptorProto(func_get_arg(0), func_get_arg(1), func_get_arg(2), func_get_arg(3), func_get_arg(4), func_get_arg(5), func_get_arg(6), func_get_arg(7));
			default:
				throw new \InvalidArgumentException('More than 8 arguments supplied, please be reasonable.');
		}
	}