All Downloads are FREE. Search and download functionalities are using the official Maven repository.

redis.clients.util.KeyMergeUtil Maven / Gradle / Ivy

Go to download

A java client for github.com/antirez/redis, a fork of github.com/xetorthio/jedis

The newest version!
package redis.clients.util;

public final class KeyMergeUtil {
  private KeyMergeUtil(){
    throw new InstantiationError( "Must not instantiate this class" );
  }

  public static String[] merge(String destKey, String[] keys) {
    String[] mergedKeys = new String[keys.length + 1];
    mergedKeys[0] = destKey;
    System.arraycopy(keys, 0, mergedKeys, 1, keys.length);
    return mergedKeys;
  }

  public static byte[][] merge(byte[] destKey, byte[][] keys) {
    byte[][] mergedKeys = new byte[keys.length + 1][];
    mergedKeys[0] = destKey;
    System.arraycopy(keys, 0, mergedKeys, 1, keys.length);
    return mergedKeys;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy