@param array $indexes

@return \Riak\Client\Core\Query\Index\RiakIndexList
762761
private function createRiakIndexList(array $indexes)
    {
        $list = [];

        foreach ($indexes as $fullName => $values) {
            $list[] = RiakIndex::fromFullname($fullName, $values);
        }

        return new RiakIndexList($list);
    }
1110861
public static <T> List<T> slice(List<T> list, int... indexes) {
		List<T> slice = new ArrayList<>(indexes.length);
		for (int i : indexes) {
			slice.add(list.get(i));
		}
		return slice;
	}
111790
public static <T> T[] getAny(Object array, int... indexes) {
		if(null == array) {
			return null;
		}
		
		final T[] result = newArray(array.getClass().getComponentType(), indexes.length);
		for (int i : indexes) {
			result[i] = get(array, i);
		}
		return result;
	}
196487
public function insureIsFilled($indexes, $defaultValue)
    {
        $newValues = [];
        foreach ($indexes as $index) {
            $newValues[$index] = array_key_exists($index, $this->values) ? $this->values[$index] : $defaultValue;
        }
        $this->values = $newValues;
    }
592243
public function setColumns(array $indexColumns)
    {
        $this->indexColumns = array();
        $this->indexColumnSizes = array();
        foreach ($indexColumns as $col) {
            $this->addColumn($col);
        }
    }
708202
public static function getRulesEndIndexes(array $arrayRulesIndexes): array
    {
        assert(array_key_exists(static::RULES_ARRAY_END_INDEXES, $arrayRulesIndexes));
        $result = $arrayRulesIndexes[static::RULES_ARRAY_END_INDEXES];

        return $result;
    }
82233
protected function doFetch(array $ids)
    {
        if ( ! $ids) {
            return [];
        }

        return $this->redis->hmget($this->namespace, $this->keys($ids));
    }
133103
public function indexBy($indexBy)
    {
        foreach ($this->queries as $query) {
            $query->indexBy($indexBy);
        }

        return $this;
    }
750903
public function filterModelsByIndex($indexes)
    {
        $this->filteredIndexes = array_merge($this->filteredIndexes, $indexes);
        $this->filteredIndexCount = count($this->filteredIndexes);
    }
511090
protected function getIndexFields(array $indexSequences): string
    {
        $indexFields = [];
        foreach ($indexSequences as $indexData) {
            $indexFields[] = $indexData['Column_name'];
        }

        $result = $this->prettifyArray($indexFields, 3);

        return $result;
    }
1103546
protected function assignIndexes($indexes)
    {
        foreach ($indexes as $index) {
            if (!$index instanceof IndexInterface) {
                throw new ModelException(sprintf('Index must be an instance of IndexInterface, got "%s"', $this->getType($index)));
            }

            foreach ($index->fields() as $key => $field) {
                $field = $index->type() == 'foreign' ? $key : $field;

                $this->assertField($field);
            }

            if ($index->type() !== 'foreign') {
                $index->table($this->table);
            }

            $this->indexes[$index->name()] = $index;
        }
    }
514951
public function setIndexes(array $indexes)
    {
        foreach ($indexes as $identifier => $index) {
            if (!isset($index['path'])) {
                throw new \InvalidArgumentException('Each lucene index must have a path value.');
            }

            $this->setIndex(
                $identifier,
                $index['path'],
                isset($index['analyzer']) ? $index['analyzer'] : self::DEFAULT_ANALYZER,
                isset($index['max_buffered_docs']) ? $index['max_buffered_docs'] : self::DEFAULT_MAX_BUFFERED_DOCS,
                isset($index['max_merge_docs']) ? $index['max_merge_docs'] : self::DEFAULT_MAX_MERGE_DOCS,
                isset($index['merge_factor']) ? $index['merge_factor'] : self::DEFAULT_MERGE_FACTOR,
                isset($index['permissions']) ? $index['permissions'] : self::DEFAULT_PERMISSIONS,
                isset($index['auto_optimized']) ? $index['auto_optimized'] : self::DEFAULT_AUTO_OPTIMIZED,
                isset($index['query_parser_encoding']) ? $index['query_parser_encoding'] : self::DEFAULT_QUERY_PARSER_ENCODING
            );
        }
    }
949880
public function addIndex($columns)
    {
        $index = new Index($columns, $this);

        $this->actions[] =  function () use ($index) {
             return $this->manipulation->create($index);
        };

        return $this;
    }
220587
protected function filterQueries($queries)
    {
        $app = Application::getFacadeApplication();
        $config = $app->make('config');

        $textIndexDrops = [];
        foreach ($config->get('database.text_indexes') as $indexTable => $indexDefinition) {
            foreach (array_keys($indexDefinition) as $indexName) {
                $textIndexDrops[] = strtolower("DROP INDEX {$indexName} ON {$indexTable}");
            }
        }

        $returnQueries = [];
        foreach ($queries as $query) {
            $queryLowerCase = strtolower($query);
            if (!in_array($queryLowerCase, $textIndexDrops, true)) {
                $returnQueries[] = $query;
            }
        }

        return $returnQueries;
    }
443033
public function getIndexMap(string $indexKey = null)
    {
        if (null === $indexKey) {
            return $this->getEntries();
        }

        // Get storage keys for the objects.
        $index = [];
        foreach ($this->getEntries() as $key => $value) {
            $index[$key] = $value[$indexKey] ?? null;
        }

        return $index;
    }
1060018
protected function findPrimaryKeyIndex(array $indexes) {
        foreach ($indexes as $index) {
            if ($index['type'] === Db::INDEX_PK) {
                return $index;
            }
        }
        return null;
    }
8766
public function setQueries($queries)
    {
        $this->queries = [];
        if (!is_array($queries)) {
            $queries = [$queries];
        }
        foreach ($queries as $query) {
            $this->addQuery($query);
        }

        return $this;
    }