Android Array Copy appendWhereArgsToSelectionArgs( String[] selectionArgs, String[] whereArgs)

Here you can find the source of appendWhereArgsToSelectionArgs( String[] selectionArgs, String[] whereArgs)

Description

append Where Args To Selection Args

License

Open Source License

Parameter

Parameter Description
selectionArgs the original selectionArgs (if any)
whereArgs the whereArgs (if any)

Return

both sets appended (whereArgs first)

Declaration

public static String[] appendWhereArgsToSelectionArgs(
        String[] selectionArgs, String[] whereArgs) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from   w w  w .  j  a v  a2  s.c  o m*/
     * @param selectionArgs the original selectionArgs (if any)
     * @param whereArgs the whereArgs (if any)
     * @return both sets appended (whereArgs first)
     */
    public static String[] appendWhereArgsToSelectionArgs(
            String[] selectionArgs, String[] whereArgs) {
        if (whereArgs == null || whereArgs.length == 0) {
            return selectionArgs;
        }
        if (selectionArgs == null || selectionArgs.length == 0) {
            return whereArgs;
        }
        final String[] result = new String[selectionArgs.length
                + whereArgs.length];
        System.arraycopy(whereArgs, 0, result, 0, whereArgs.length);
        System.arraycopy(selectionArgs, 0, result, whereArgs.length,
                selectionArgs.length);
        return result;
    }
}

Related

  1. copyOf(long[] obj)
  2. copyOf(long[] obj, int newSize)
  3. copyOfRange(final byte[] source, final int from, final int to)
  4. copy(int[] rSource)
  5. copy(float[] src, Buffer dst, int numFloats, int offset)
  6. arraycopy(String src, int srcOffset, byte[] dst, int dstOffset, int length)
  7. arraycopy(byte[] from, byte[] to)
  8. arrayCopy(byte[] src, int srcPos, byte[] dest, int destPos, int length)
  9. copyOf(byte[] bytes)