/** * Creates a new map. * * @param c The value type. * @param idGen An ID generator. * @return A new instance. */ public static <K,T> IdMap<K,T> create(Class<T> c, IdGenerator<K> idGen) { return new IdMap<>(c, idGen); }
/** * Creates a new ID map with integer keys with generator initialized to <code>1</code>. * * @param c The value type. * @return A new map. */ public static <T> IdMap<Integer,T> createIntMap(Class<T> c) { return createIntMap(c, 1); }
/** * Creates a new ID map with long keys with generator initialized to <code>1</code>. * * @param c The value type. * @return A new map. */ public static <T> IdMap<Long,T> createLongMap(Class<T> c) { return createLongMap(c, 1l); }
/** * Creates a new ID map with integer keys with generator initialized to the specified value. * * @param c The value type. * @param initValue The initial value of the generator. * @return A new map. */ public static <T> IdMap<Integer,T> createIntMap(Class<T> c, int initValue) { return create(c, IdGenerators.createIntGenerator(initValue)); }
/** * Creates a new ID map with long keys with generator initialized to the specified value. * * @param c The value type. * @param initValue The initial value of the generator. * @return A new map. */ public static <T> IdMap<Long,T> createLongMap(Class<T> c, long initValue) { return create(c, IdGenerators.createLongGenerator(initValue)); }
/** * Creates a new ID map with integer keys with generator initialized to the specified value. * * @param c The value type. * @param initValue The initial value of the generator. * @return A new map. */ public static <T> IdMap<Integer,T> createIntMap(Class<T> c, int initValue) { return create(c, IdGenerators.createIntGenerator(initValue)); }
/** * Creates a new ID map with long keys with generator initialized to <code>1</code>. * * @param c The value type. * @return A new map. */ public static <T> IdMap<Long,T> createLongMap(Class<T> c) { return createLongMap(c, 1l); }
/** * Creates a new ID map with integer keys with generator initialized to <code>1</code>. * * @param c The value type. * @return A new map. */ public static <T> IdMap<Integer,T> createIntMap(Class<T> c) { return createIntMap(c, 1); }
/** * Creates a new map. * * @param c The value type. * @param idGen An ID generator. * @return A new instance. */ public static <K,T> IdMap<K,T> create(Class<T> c, IdGenerator<K> idGen) { return new IdMap<>(c, idGen); }
/** * Creates a new ID map with integer keys with generator initialized to the specified value. * * @param c The value type. * @param initValue The initial value of the generator. * @return A new map. */ public static <T> IdMap<Integer,T> createIntMap(Class<T> c, int initValue) { return create(c, IdGenerators.createIntGenerator(initValue)); }
/** * Creates a new ID map with long keys with generator initialized to <code>1</code>. * * @param c The value type. * @return A new map. */ public static <T> IdMap<Long,T> createLongMap(Class<T> c) { return createLongMap(c, 1l); }
/** * Creates a new ID map with integer keys with generator initialized to <code>1</code>. * * @param c The value type. * @return A new map. */ public static <T> IdMap<Integer,T> createIntMap(Class<T> c) { return createIntMap(c, 1); }
/** * Creates a new map. * * @param c The value type. * @param idGen An ID generator. * @return A new instance. */ public static <K,T> IdMap<K,T> create(Class<T> c, IdGenerator<K> idGen) { return new IdMap<>(c, idGen); }
/** * Creates a new ID map with long keys with generator initialized to the specified value. * * @param c The value type. * @param initValue The initial value of the generator. * @return A new map. */ public static <T> IdMap<Long,T> createLongMap(Class<T> c, long initValue) { return create(c, IdGenerators.createLongGenerator(initValue)); }
/** * Creates a new ID map with long keys with generator initialized to the specified value. * * @param c The value type. * @param initValue The initial value of the generator. * @return A new map. */ public static <T> IdMap<Long,T> createLongMap(Class<T> c, long initValue) { return create(c, IdGenerators.createLongGenerator(initValue)); }