Return the set values as an array if the cardinality is less
than 2147483648. The integer values are in sorted order.

@return array representing the set values.
161942
@Override
  public int[] toArray() {
    final int[] array = new int[this.getCardinality()];
    int pos = 0, pos2 = 0;
    while (pos < this.highLowContainer.size()) {
      final int hs = BufferUtil.toIntUnsigned(this.highLowContainer.getKeyAtIndex(pos)) << 16;
      final MappeableContainer c = this.highLowContainer.getContainerAtIndex(pos++);
      c.fillLeastSignificant16bits(array, pos2, hs);
      pos2 += c.getCardinality();
    }
    return array;
  }
1224367
public static final function values() {
			$key = get_called_class();

			if (array_key_exists($key, self::$types))
				return self::$types[$key];

			return array();
		}
702921
public function getAllowedValues()
    {
        $inArrayFilters = $this->getRequirements()->filter(
            function($value) {
                return $value instanceof InArray;
            }
        );

        if (count($inArrayFilters) > 0) {
            return $inArrayFilters->first()->getValues();
        }
        return [];
    }
376476
public function getDimensionValues()
    {
        $values = [];
        
        foreach ($this->fields as $dim => $field) {
            $values[$dim] = is_numeric($field->dataValue()) ? (int) $field->dataValue() : null;
        }
        
        return $values;
    }
1144224
public function values()
    {
        $count       = $this->count()->toNative();
        $valuesArray = new \SplFixedArray($count);

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

        return new Collection($valuesArray);
    }
294523
public function toArray()
    {
        $arr = [];
        foreach ($this as $k => $entry) {
            if (!$entry instanceof Generic) {
                continue;
            }
            $arr[$k] = $entry->value;
        }
        return $arr;
    }
435693
public static int[] toArray(final Collection<Integer> collection) {
        Objects.requireNonNull(collection);
        
        final int size = collection.size();
        final int[] array = new int[size];
        
        int i=0;
        for(Integer value : collection) {
            array[i] = value;
            i++;
        }
        
        return array;
    }
462459
public int[] toArray() {
		int[] a = new int[this.collection.size()];
		int i = 0;
		for (int col : this.collection) {
			a[i++] = col;
		}
		return a;
	}
234708
public function toArray()
    {
        $array = [];
        foreach ($this->array as $hash => $value) {
            $key = $this->hash_to_key($hash);
            if ($this->is_collection_like($value)) {
                $array[$key] = $this->collection_to_array($value);
            } else {
                $array[$key] = $value;
            }
        }
        return $array;
    }
539557
public V[] getValues() {
		final V[] array = factory.newArray(elementCount);
		int i = 0;
		for (final V v : this) {
			array[i++] = v;
		}
		return array;
	}
1106790
public function getArray()
    {
        $options = [];

        if ($this->isDisabled() || $this->canHaveValue() && empty($this->values)) {
            return $options;
        }

        foreach ($this->values as $value) {
            $options[] = $this->flag();
            $options[] = $value;
        }

        if (empty($options)) {
            $options[] = $this->flag();
        }

        return $options;
    }
1350008
public function toArray() {
        $r = [
            'from' => $this->from,
            'where' => $this->where,
            'order' => $this->order,
            'limit' => $this->limit,
            'offset' => $this->offset
        ];

        return $r;
    }
1246043
public function toMappedArray()
    {
        $values = $this->toArray();
        $mappedValues = [];
        foreach ($values as $key => $value) {
            $mappedValues[$key] = $this->readMapped($key);
        }

        return $mappedValues;
    }
482855
public double[] getTrimmedInternalArray() {
        if (internalArray.length == lastIndex + 1) {
            return internalArray;
        }
        double[] newArray = new double[lastIndex + 1];
        System.arraycopy(internalArray, 0, newArray, 0, newArray.length);
        return newArray;
    }
1121779
public static Format[] values() {
            Format[] retVal = new Format[predefined.size()];
            return predefined.values().toArray(retVal);
        }
6150
function limitArray()
    {
        $limitValues = $this->attribute( 'values' );

        $valueArray = array();

        foreach ( array_keys( $limitValues ) as $valueKey )
        {
            $valueArray[] = $limitValues[$valueKey]->attribute( 'value' );
        }

        return array( $this->attribute( 'identifier' ) => $valueArray );
    }
848158
private Set<Integer> arrayToSet(int[] arr) {
        Set<Integer> s = new HashSet<Integer>();
        for (int value : arr)
            s.add(value);
        return s;
    }