List of usage examples for java.util Map put
V put(K key, V value);
From source file:Main.java
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) private static void addICSStates(Map<String, Integer> states) { states.put("hovered", android.R.attr.state_hovered); states.put("drag_can_accept", android.R.attr.state_drag_can_accept); states.put("drag_hovered", android.R.attr.state_drag_hovered); }
From source file:Main.java
public static Map<String, Object> confirmMoneyListMap(String endorsementId, Double totalFee, String reqNo, Double arrdv, Integer carEndorsementSeq) { Map<String, Object> map = getMap(); map.put("endorsementId", endorsementId); map.put("totalFee", totalFee); map.put("reqNo", reqNo); map.put("arrdv", arrdv); map.put("carEndorsementSeq", carEndorsementSeq); return map;/* w w w . j a v a2s . c om*/ }
From source file:DynaBeansExampleV1.java
private static Object createMovieBean() throws Exception { // first create the properties DynaProperty properties[] = new DynaProperty[] { new DynaProperty("title", String.class), new DynaProperty("dateOfRelease", Date.class), new DynaProperty("keywords", String[].class), new DynaProperty("genre", Map.class), new DynaProperty("actors", List.class), new DynaProperty("director", DynaBean.class) }; // next using the properties define the class DynaClass movieClass = new BasicDynaClass("movie", null, properties); // now, with the class, create a new instance DynaBean movieBean = movieClass.newInstance(); // set its properties movieBean.set("title", "The Italian Job"); movieBean.set("dateOfRelease", new GregorianCalendar(1969, 0, 1).getTime()); movieBean.set("keywords", new String[] { "Italy", "Bank Robbery" }); Map genre = new HashMap(); genre.put("THR", "Thriller"); movieBean.set("genre", genre); movieBean.set("genre", "ACT", "Action"); DynaBean director = createPersonBean(); director.set("name", "Peter Collinson"); director.set("gender", new Integer(1)); movieBean.set("director", director); return movieBean; }
From source file:com.netflix.spinnaker.fiat.Main.java
private static Map<String, Object> buildDefaults() { Map<String, String> defaults = new HashMap<>(); defaults.put("netflix.environment", "test"); defaults.put("netflix.account", "${netflix.environment}"); defaults.put("netflix.stack", "test"); defaults.put("spring.config.location", "${user.home}/.spinnaker/"); defaults.put("spring.application.name", "fiat"); defaults.put("spring.config.name", "spinnaker,${spring.application.name}"); defaults.put("spring.profiles.active", "${netflix.environment},local"); return Collections.unmodifiableMap(defaults); }
From source file:com.richeninfo.springmvcex.ClientReturnUtils.java
public static Map<String, Object> createReturnMap(Boolean result) { Map map = new HashMap(); map.put("success", result); return map;/*from ww w. j a v a2s . c o m*/ }
From source file:Main.java
public static void getEntityValues(Node node, Map map) { if (node instanceof EntityReference) { map.put(node.getNodeName(), node); }/*from www. ja v a 2 s. c o m*/ NodeList list = node.getChildNodes(); for (int i = 0; i < list.getLength(); i++) { getEntityValues(list.item(i), map); } }
From source file:Main.java
public static void setFontAttribute(Component component, Object key, Object value) { Font original = component.getFont(); Map attributes = original.getAttributes(); attributes.put(key, value); component.setFont(original.deriveFont(attributes)); }
From source file:Main.java
public static void setSoapEndpointUrl(Object wsProxy, String soapUrl) { javax.xml.ws.BindingProvider bp = (javax.xml.ws.BindingProvider) wsProxy /*port*/; Map<String, Object> context = bp.getRequestContext(); context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, soapUrl); }
From source file:Main.java
public static Map<String, Object> getActiveCarEgg(Integer carOwnerSeq, Integer carInfoSeq, String careggSn, String verifyCode, String carDistance) { Map<String, Object> map = getMap(); map.put("carOwnerSeq", carOwnerSeq); map.put("carInfoSeq", carInfoSeq); map.put("careggSn", careggSn); map.put("verifyCode", verifyCode); map.put("carDistance", carDistance); return map;//from w w w .j ava 2 s . com }
From source file:Main.java
public static Map<String, String> getAliPayParams(String subject, String body, String out_trade_no, String total_fee, String pay_business) { Map<String, String> map = getMap(); map.put("subject", subject); map.put("body", body); map.put("out_trade_no", out_trade_no); map.put("total_fee", total_fee); map.put("pay_business", pay_business); return map;/* www . java 2 s . c o m*/ }