public static float[] prepend(final float[] array, final float value) { if (isNullOrEmpty(array)) { return new float[] { value }; } return insert(array, 0, value); }
public static boolean isKeyword(final String identifier) { return ArrayUtilities.contains(KEYWORDS, identifier); }
@Override public void emitCase(final int key, final Label breakTarget) throws Exception { final int keyIndex = ArrayUtilities.indexOf(intKeys, key); callback.emitCase(keys[keyIndex], breakTarget); }
public BootstrapMethodsAttribute(final BootstrapMethodsTableEntry... bootstrapMethods) { super(AttributeNames.BootstrapMethods, computeSize(bootstrapMethods)); _bootstrapMethods = ArrayUtilities.isNullOrEmpty(bootstrapMethods) ? Collections.<BootstrapMethodsTableEntry>emptyList() : ArrayUtilities.asUnmodifiableList(bootstrapMethods); }
VerifyArgument.notNull(array, "array"); if (isNullOrEmpty(values)) { return array; final int index = indexOf(array, value); return append(array, values);
private MethodBuilder defineMethodCore( final String name, final int modifiers, final Type<?> returnType, final TypeList parameterTypes, final TypeList thrownTypes) { VerifyArgument.notNullOrWhitespace(name, "name"); verifyNotGeneric(); verifyNotCreated(); final MethodBuilder method = new MethodBuilder( name, modifiers, returnType, parameterTypes, thrownTypes, this ); methodBuilders.add(method); _methods = new MethodList(ArrayUtilities.append(_methods.toArray(), method)); return method; }
public static boolean[] copy(final boolean[] source, final boolean[] target) { VerifyArgument.notNull(source, "source"); return copy(source, 0, target, 0, source.length); }
@Override public final List<Node> getChildren() { final int size = _caseBlocks.size() + (_condition != null ? 1 : 0); final Node[] children = new Node[size]; int i = 0; if (_condition != null) { children[i++] = _condition; } for (final CaseBlock caseBlock : _caseBlocks) { children[i++] = caseBlock; } return ArrayUtilities.asUnmodifiableList(children); }
public static Object copyOf(final Object array, final int newLength) { return copyOf(VerifyArgument.notNull(array, "array"), newLength, array.getClass()); }
VerifyArgument.notNull(array, "array"); if (isNullOrEmpty(values)) { return array; final int index = indexOf(array, value); return append(array, values);
private MethodBuilder defineMethodCore( final String name, final int modifiers, final Type<?> returnType, final TypeList parameterTypes, final TypeList thrownTypes) { VerifyArgument.notNullOrWhitespace(name, "name"); verifyNotGeneric(); verifyNotCreated(); final MethodBuilder method = new MethodBuilder( name, modifiers, returnType, parameterTypes, thrownTypes, this ); methodBuilders.add(method); _methods = new MethodList(ArrayUtilities.append(_methods.toArray(), method)); return method; }
public static byte[] copy(final byte[] source, final byte[] target) { VerifyArgument.notNull(source, "source"); return copy(source, 0, target, 0, source.length); }
public BootstrapMethodsAttribute(final BootstrapMethodsTableEntry... bootstrapMethods) { super(AttributeNames.BootstrapMethods, computeSize(bootstrapMethods)); _bootstrapMethods = ArrayUtilities.isNullOrEmpty(bootstrapMethods) ? Collections.<BootstrapMethodsTableEntry>emptyList() : ArrayUtilities.asUnmodifiableList(bootstrapMethods); }
public ExceptionsAttribute(final TypeReference... exceptionTypes) { super( AttributeNames.Exceptions, 2 * (1 + VerifyArgument.noNullElements(exceptionTypes, "exceptionTypes").length) ); _exceptionTypes = ArrayUtilities.asUnmodifiableList(exceptionTypes); }
public static Object copyOf(final Object array, final int newLength) { return copyOf(VerifyArgument.notNull(array, "array"), newLength, array.getClass()); }
public static float[] prepend(final float[] array, final float value) { if (isNullOrEmpty(array)) { return new float[] { value }; } return insert(array, 0, value); }
VerifyArgument.notNull(array, "array"); if (isNullOrEmpty(values)) { return array; final int index = indexOf(array, value); return append(array, values);
private MethodBuilder defineMethodCore( final String name, final int modifiers, final Type<?> returnType, final TypeList parameterTypes, final TypeList thrownTypes) { VerifyArgument.notNullOrWhitespace(name, "name"); verifyNotGeneric(); verifyNotCreated(); final MethodBuilder method = new MethodBuilder( name, modifiers, returnType, parameterTypes, thrownTypes, this ); methodBuilders.add(method); _methods = new MethodList(ArrayUtilities.append(_methods.toArray(), method)); return method; }