Factory method for creating Array objects.
779415
@Override
    public Array createArrayOf(String typeName, Object[] elements) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
632920
public static EditableArray newArray( Collection<?> values ) {
        BasicArray array = new BasicArray(values.size());
        array.addAllValues(values);
        return new ArrayEditor(array, DEFAULT_FACTORY);
    }
1205421
protected function buildObjectsArray()
    {
        $objects = [];
        foreach ($this->objectConfigurations as $objectConfiguration) {
            $objectName = $objectConfiguration->getObjectName();
            $objects[$objectName] = [
                'l' => strtolower($objectName),
                's' => $objectConfiguration->getScope(),
                'p' => $objectConfiguration->getPackageKey()
            ];
            if ($objectConfiguration->getClassName() !== $objectName) {
                $objects[$objectName]['c'] = $objectConfiguration->getClassName();
            }
            if ($objectConfiguration->getFactoryObjectName() !== '') {
                $objects[$objectName]['f'] = [
                    $objectConfiguration->getFactoryObjectName(),
                    $objectConfiguration->getFactoryMethodName()
                ];

                $objects[$objectName]['fa'] = [];
                $factoryMethodArguments = $objectConfiguration->getArguments();
                if (count($factoryMethodArguments) > 0) {
                    foreach ($factoryMethodArguments as $index => $argument) {
                        $objects[$objectName]['fa'][$index] = [
                            't' => $argument->getType(),
                            'v' => $argument->getValue()
                        ];
                    }
                }
            }
        }
        $this->configurationCache->set('objects', $objects);
        return $objects;
    }
529452
private Object[] _asArray(
                    final Object obj
                    )
    {
        Object[]  array = null;
        if (obj instanceof Object[]) {
            array = (Object[])obj;
            if (array.length == 0) {
                throw new IllegalArgumentException( "ERROR: empty array" );
            }
        } else {
            array = new Object[] { obj };
        }

        return array;
    }
20806
private static List<Object> arrayToList(final Object array) {
    if (array instanceof Object[])
      return Arrays.asList((Object[]) array);

    List<Object> result = new ArrayList<Object>();
    // Arrays of the primitive types can't be cast to array of Object, so this:
    if (array instanceof int[])
      for (int value : (int[]) array) result.add(value);
    else if (array instanceof boolean[])
      for (boolean value : (boolean[]) array) result.add(value);
    else if (array instanceof long[])
      for (long value : (long[]) array) result.add(value);
    else if (array instanceof float[])
      for (float value : (float[]) array) result.add(value);
    else if (array instanceof double[])
      for (double value : (double[]) array) result.add(value);
    else if (array instanceof short[])
      for (short value : (short[]) array) result.add(value);
    else if (array instanceof byte[])
      for (byte value : (byte[]) array) result.add(value);
    else if (array instanceof char[])
      for (char value : (char[]) array) result.add(value);
    return result;
  }
713853
function(methods) {
    var keys = Object.keys(methods);
    var len = keys.length;
    for (var i = 0; i < len; i++) {
      var key = keys[i];
      this[key] = lib.method.createMethod(methods[key]);
    }
    return factory;
  }
946019
private static int[] createIncrIntArray(int numKeys) {
		int[] keyFields = new int[numKeys];
		for (int i = 0; i < numKeys; i++) {
			keyFields[i] = i;
		}
		return keyFields;
	}
476677
@NotNull
    public Object[] toArray() {
        return toArray(new IntFunction<Object[]>() {

            @NotNull
            @Override
            public Object[] apply(int value) {
                return new Object[value];
            }
        });
    }
1055750
private static ArrayValue createArrayValue(final Collection<? extends ParsedAttribute<?>> value) {
		final List<Value> list = new ArrayList<>(value.size());
		for (final ParsedAttribute<?> parsed : value)
			list.add(parsed.getValue());

		return new ArrayValue(list);
	}
384211
public final static Object toObjectArray(final Object array) {
        if (!array.getClass().isArray()) {
            return array;
        }
        final Class<?> clazz = PRIMITIVE_TO_OBJ.get(array.getClass().getComponentType());
        return setArray(clazz, array);
    }
526085
function( array, type, forceClone ) {

		if ( ! array || // let 'undefined' and 'null' pass
				! forceClone && array.constructor === type ) return array;

		if ( typeof type.BYTES_PER_ELEMENT === 'number' ) {

			return new type( array ); // create typed array

		}

		return Array.prototype.slice.call( array ); // create Array

	}
658855
public static EditableArray newArray( Object... values ) {
        BasicArray array = new BasicArray();
        for (Object value : values) {
            array.addValue(value);
        }
        return new ArrayEditor(array, DEFAULT_FACTORY);
    }
1067288
private static int [] growArray(int[] array, float growFactor) {
        int currentSize = array.length;
        int newArray[] = new int[(int)(currentSize * growFactor)];
        System.arraycopy(array, 0, newArray, 0, currentSize);
        return newArray;
    }
826424
function makeArray() {
  var arr = [];

  for (var i = 0; i < arguments.length; i++) {
    var arg = arguments[i];
    if (!arg) continue;

    var argType = typeof arg;

    if ('string' === argType || 'number' === argType) {
      arr.push(arg);
    } else if (Array.isArray(arg)) {
      arr = arr.concat(arg);
    } else if ('object' === argType) {
      for (var key in arg) {
        if (arg.hasOwnProperty(key) && arg[key]) {
          arr.push(key);
        }
      }
    }
  }

  return arr;
}
143908
function create() {
  var out = new glMatrix.ARRAY_TYPE(3);
  if (glMatrix.ARRAY_TYPE != Float32Array) {
    out[0] = 0;
    out[1] = 0;
    out[2] = 0;
  }
  return out;
}
3380
function ArrayType(attrs, opts) {
  Type.call(this);

  if (!attrs.items) {
    throw new Error(f('missing array items: %j', attrs));
  }
  this._items = createType(attrs.items, opts);
}
1336842
def _create_array(self, format, args):
        """"""

        builder = None
        if args is None or not args[0]:
            # empty value: we need to call _create() to parse the subtype,
            # and specify the element type precisely
            rest_format = self._create(format[1:], None)[1]
            element_type = format[:len(format) - len(rest_format)]
            builder = GLib.VariantBuilder.new(variant_type_from_string(element_type))
        else:
            builder = GLib.VariantBuilder.new(variant_type_from_string('a*'))
            for i in range(len(args[0])):
                (v, rest_format, _) = self._create(format[1:], args[0][i:])
                builder.add_value(v)
        if args is not None:
            args = args[1:]
        return (builder.end(), rest_format, args)