Gets the keys of a Hashtable

@param table
a Hashtable
@return the keyset of a Hashtable (or an empty set if table is null)
8981
public static Set getKeySet(Hashtable table) {
		return (table == null) ? Collections.EMPTY_SET : table.keySet();
	}
800875
public Set<E> keysAt(int count) {
    Set<E> keys = new HashSet<E>();
    for (E key : map.keySet()) {
      if (getIntCount(key) == count) {
        keys.add(key);
      }
    }
    return keys;
  }
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;
	    }
	};
    }
576036
public Set<String> keySet() {

		// Copy key set, so return value is independent from the object's internal data structure
		final Set<String> retVal = new HashSet<String>();

		synchronized (this.confData) {

			final Iterator<String> it = this.confData.keySet().iterator();
			while (it.hasNext()) {
				retVal.add(it.next());
			}
		}

		return retVal;
	}
142797
public function getTableForeignKeys( $table )
    {
        $query = 'SELECT CONSTRAINT_SCHEMA, CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME,
                  REFERENCED_TABLE_SCHEMA, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME
                  FROM information_schema.KEY_COLUMN_USAGE WHERE CONSTRAINT_SCHEMA = ?
                  AND TABLE_NAME = ? AND REFERENCED_COLUMN_NAME IS NOT NULL;';

        $params = [ $this->name, $table ];

        $statement = $this->database->prepare( $query );
        $statement->execute( $params );

        $results = $statement->fetchAll();

        $keys = [ ];

        if ( !empty( $results ) )
        {
            foreach ( $results as $result )
            {
                $record                          = [ ];
                $record[ 'database' ]            = $result[ 'CONSTRAINT_SCHEMA' ];
                $record[ 'key_name' ]            = $result[ 'CONSTRAINT_NAME' ];
                $record[ 'table' ]               = $result[ 'TABLE_NAME' ];
                $record[ 'column' ]              = $result[ 'COLUMN_NAME' ];
                $record[ 'referenced_database' ] = $result[ 'REFERENCED_TABLE_SCHEMA' ];
                $record[ 'referenced_table' ]    = $result[ 'REFERENCED_TABLE_NAME' ];
                $record[ 'referenced_column' ]   = $result[ 'REFERENCED_COLUMN_NAME' ];

                $keys[ ] = $record;
            }
        }

        return $keys;
    }
346394
public Set<Object> keySet()
	{
		Map<Object,Object> properties = this.getProperties();
		if(properties == null)
			return null;
		
		return properties.keySet();
	}
1204912
public Hashtable<String, Object> toHash() {
		final Hashtable<String, Object> values = new Hashtable();
		for (int i = 0; i < this.columnsValues.size(); i++) {
			final JKTableColumnValue value = this.columnsValues.get(i);
			values.put(getColumn(i).getName(), value);
		}
		return values;

	}
377668
public TableKeysAndAttributes withHashOnlyKeys(String hashKeyName, Object ... hashKeyValues) {
        if (hashKeyName == null)
            throw new IllegalArgumentException();
        PrimaryKey[] primaryKeys = new PrimaryKey[hashKeyValues.length];
        for (int i=0; i < hashKeyValues.length; i++)
            primaryKeys[i] = new PrimaryKey(hashKeyName, hashKeyValues[i]);
        return withPrimaryKeys(primaryKeys);
    }
1217334
@SuppressWarnings({ "rawtypes", "unchecked" })
    @Deprecated
    public static Hashtable getContext() {
        Map map = org.slf4j.MDC.getCopyOfContextMap();

        if (map != null) {
            return new Hashtable(map);
        } else {
            return new Hashtable();
        }
    }
905274
@Override
    public Set<String> keySet() {
        Set<String> keys = new HashSet<>();
        keysR(root.getLeft(), -1, keys);
        return keys;
    }
920701
public Iterator<String> keySet()
    {
        Node node = getNode(true);
        NodeList nodeList = node.getChildNodes();
        return new NodeIterator(nodeList);
    }
1309039
public static Table getTable(HiveTable hiveTable) {
    State props = hiveTable.getProps();
    Table table = new Table();
    table.setDbName(hiveTable.getDbName());
    table.setTableName(hiveTable.getTableName());
    table.setParameters(getParameters(props));
    if (hiveTable.getCreateTime().isPresent()) {
      table.setCreateTime(Ints.checkedCast(hiveTable.getCreateTime().get()));
    }
    if (hiveTable.getLastAccessTime().isPresent()) {
      table.setLastAccessTime(Ints.checkedCast(hiveTable.getLastAccessTime().get()));
    }
    if (hiveTable.getOwner().isPresent()) {
      table.setOwner(hiveTable.getOwner().get());
    }
    if (hiveTable.getRetention().isPresent()) {
      table.setRetention(Ints.checkedCast(hiveTable.getRetention().get()));
    }
    if (hiveTable.getTableType().isPresent()) {
      table.setTableType(hiveTable.getTableType().get());
    } else {
      table.setTableType(DEFAULT_TABLE_TYPE.toString());
    }
    if (table.getTableType().equals(TableType.EXTERNAL_TABLE.toString())) {
      table.getParameters().put(EXTERNAL, Boolean.TRUE.toString().toUpperCase());
    }
    table.setPartitionKeys(getFieldSchemas(hiveTable.getPartitionKeys()));
    table.setSd(getStorageDescriptor(hiveTable));
    return table;
  }
100191
public String getTableName(String table, Number shardKey) {
        if (orMapping.getShardCount() <= 1 || shardKey == null || shardKey.longValue() <= 0) {
            return table;
        }

        return table + calShardNum(shardKey.longValue());
    }
561597
int[] getKeys()
    {
        Set<Integer> keySet = map.keySet();
        int keys[] = new int[keySet.size()];
        int index = 0;
        for (Integer key : keySet)
        {
            keys[index] = key;
            index++;
        }
        return keys;
    }
142099
public String getKeyByIndex(int index) {
		Set<String> keySet = keyIndexs.keySet();
		for (String key : keySet) {
			int idx = keyIndexs.get(key);
			if (index == idx) {
				return key;
			}
		}
		return null;
	}
1213780
byte[] getFirstKey(TableKelp table)
  {
    int keyOffset = table.getKeyOffset();
    int keyLength = table.getKeyLength();
    
    int offset = _rowHead + keyOffset;
    
    byte []key = new byte[keyLength];
    byte []buffer = getBuffer();
    
    System.arraycopy(buffer, offset, key, 0, keyLength);
    
    return key;
  }
633282
protected List<String> getPrimaryKeys(String tableName) {
        List<String> pkCols = new ArrayList<String>();
        try {
            // Lower-case table names are required for PostgreSQL; we might need to
            // alter this if we use another comparison database (besides HSQL) someday
            ResultSet rs = dbconn.getMetaData().getPrimaryKeys(null, null, tableName.toLowerCase());
            while (rs.next()) {
                pkCols.add(rs.getString(4));
            }
        } catch (SQLException e) {
            printCaughtException("In NonVoltDBBackend.getPrimaryKeys, caught SQLException: " + e);
        }
        return pkCols;
    }