List of usage examples for java.util LinkedHashMap LinkedHashMap
public LinkedHashMap()
From source file:com.tek271.reverseProxy.utils.Tuple2.java
public static <E1, E2> Map<E1, E2> toMap(boolean skipNullValues, Tuple2<E1, E2>... tuples) { Map<E1, E2> map = new LinkedHashMap<E1, E2>(); for (Tuple2<E1, E2> t : tuples) { if (!skipNullValues || t.e2 != null) { map.put(t.e1, t.e2);//w w w .j av a 2s .c o m } } return map; }
From source file:Main.java
public static <K, V> Map<K, V> mapOf(K key, V value, K key2, V value2, K key3, V value3, K key4, V value4, K key5, V value5) {// ww w. jav a 2s.com Map<K, V> map = new LinkedHashMap<K, V>(); map.put(key, value); map.put(key2, value2); map.put(key3, value3); map.put(key4, value4); map.put(key5, value5); return map; }
From source file:com.egt.core.db.ddl.Clase.java
public Clase(Long identificacion, String nombre) { this.setIdentificacion(identificacion); this.setNombre(nombre); this.setDescripcion(""); this.tablas = new LinkedHashMap(); }
From source file:net.jmhertlein.mcanalytics.api.request.UniqueLoginsPerDayRequest.java
@Override public Map<LocalDate, Integer> processResponse(JSONObject response) { JSONObject counts = response.getJSONObject("logins"); LinkedHashMap<LocalDate, Integer> ret = new LinkedHashMap<>(); for (String s : counts.keySet()) { ret.put(LocalDate.parse(s), counts.getInt(s)); }/* w w w. j ava 2s .co m*/ return ret; }
From source file:guru.bubl.module.model.validator.UserValidator.java
public static Map<String, String> errorsForUserAsJson(JSONObject user) { Map<String, String> errors = new LinkedHashMap<>(); errors.putAll(errorsForEmail(user.optString(UserJson.EMAIL))); errors.putAll(validateUserName(user.optString(UserJson.USER_NAME))); errors.putAll(errorsForPassword(user.optString(UserJson.PASSWORD))); return errors; }
From source file:de.itsvs.cwtrpc.security.AbstractRpcAuthenticationFailureHandler.java
static Map<Class<? extends AuthenticationException>, Class<? extends Exception>> createPackageExceptionClassMappings() { final Map<Class<? extends AuthenticationException>, Class<? extends Exception>> mappings; mappings = new LinkedHashMap<Class<? extends AuthenticationException>, Class<? extends Exception>>(); mappings.put(org.springframework.security.authentication.BadCredentialsException.class, de.itsvs.cwtrpc.security.BadCredentialsException.class); mappings.put(org.springframework.security.authentication.AccountExpiredException.class, de.itsvs.cwtrpc.security.AccountExpiredException.class); mappings.put(org.springframework.security.authentication.CredentialsExpiredException.class, de.itsvs.cwtrpc.security.CredentialsExpiredException.class); mappings.put(org.springframework.security.authentication.DisabledException.class, de.itsvs.cwtrpc.security.DisabledException.class); mappings.put(org.springframework.security.authentication.LockedException.class, de.itsvs.cwtrpc.security.LockedException.class); mappings.put(org.springframework.security.authentication.AuthenticationServiceException.class, de.itsvs.cwtrpc.security.AuthenticationServiceException.class); return mappings; }
From source file:gov.nih.nci.cabig.caaers.web.utils.WebUtils.java
/** * This method will create, options from an enumeration. * @param codedEnum/* w w w. ja v a 2s . c om*/ * @param blankValueLabel * @return */ public static Map<Object, Object> collectOptions(CodedEnum<? extends Object>[] codedEnumValues, String blankValueLabel) { Map<Object, Object> options = new LinkedHashMap<Object, Object>(); if (blankValueLabel != null) options.put("", blankValueLabel); for (int i = 0; i < codedEnumValues.length; i++) { options.put(((Enum) codedEnumValues[i]).name(), codedEnumValues[i].getDisplayName()); } return options; }
From source file:br.bireme.mlts.utils.Document2JSON.java
public static Map<String, List<Fieldable>> getMap(final Document doc) { if (doc == null) { throw new NullPointerException("doc"); }//from w w w.ja v a2 s.co m final Map<String, List<Fieldable>> ret = new LinkedHashMap<String, List<Fieldable>>(); final List<Fieldable> fields = doc.getFields(); for (Fieldable fld : fields) { List<Fieldable> lfld = ret.get(fld.name()); if (lfld == null) { lfld = new ArrayList<Fieldable>(); ret.put(fld.name(), lfld); } lfld.add(fld); } return ret; }
From source file:net.openid.appauth.AdditionalParamsProcessor.java
static Map<String, String> checkAdditionalParams(@Nullable Map<String, String> params, @NonNull Set<String> builtInParams) { if (params == null) { return Collections.emptyMap(); }/*w w w. j a v a 2 s . c o m*/ Map<String, String> additionalParams = new LinkedHashMap<>(); for (Map.Entry<String, String> entry : params.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); checkNotNull(key, "additional parameter keys cannot be null"); checkNotNull(value, "additional parameter values cannot be null"); checkArgument(!builtInParams.contains(key), "Parameter %s is directly supported via the authorization request builder, " + "use the builder method instead", key); additionalParams.put(key, value); } return Collections.unmodifiableMap(additionalParams); }
From source file:com.mirth.connect.server.migration.Migrate3_0_2.java
@Override public Map<String, Object> getConfigurationPropertiesToAdd() { Map<String, Object> propertiesToAdd = new LinkedHashMap<String, Object>(); propertiesToAdd.put("administrator.maxheapsize", "512m"); return propertiesToAdd; }