@Override public Object decode(Class targetClass, Object fromDBObject, MappedField optionalExtraInfo) { return new Combination((Map<String, String>) fromDBObject); } }
for(int i : array1) { for(int j : array2) { combinations.add(new Combination(i, j)); } }
public Combination apply(@Nullable List<String> strings) { assert strings != null; return new Combination(AxisList.this, strings); } });
public static void main(String[] args) { Set<Combination> set = new HashSet<>(); set.add(new Combination("1+2+3")); set.add(new Combination("1+2+4")); System.out.println(set.contains(new Combination("3+2+1"))); // prints "true" System.out.println(set.contains(new Combination("4+2+1"))); // prints "true" System.out.println(set.contains(new Combination("4+3+1"))); // prints "false" }
public Combination apply(@Nullable List<String> strings) { assert strings != null; return new Combination(axes, strings); } });
function Combination() { this.deferreds = []; this.success = []; this.error = []; } Combination.prototype.add = function(def, suc, err) { this.deffereds.push(def); this.success.push(suc); this.error.push(err); }; Combination.prototype.start = function() { var that = this; return $.when.apply($, this.deferreds).always(function() { for (var i=0; i<that.deferreds.length; i++) that.deferreds[i].done(that.success[i]).fail(that.error[i]); // of course we could also call them directly with the arguments[i] }); }; // Then do var comb = new Combination(); window.notifyModules("something happened", comb); // get deferreds and handlers comb.start(); // and in each module window.listen("something happended", function(c) { c.add(doRequest(), doUpdate, doErrorHandling); });
/** * Reverse operation of {@link #toString()}. */ public static Combination fromString(String id) { if(id.equals("default")) return new Combination(Collections.<String,String>emptyMap()); Map<String,String> m = new HashMap<String,String>(); StringTokenizer tokens = new StringTokenizer(id, DELIM); while(tokens.hasMoreTokens()) { String token = tokens.nextToken(); int idx = token.indexOf('='); if(idx<0) throw new IllegalArgumentException("Can't parse "+id); m.put(token.substring(0,idx),token.substring(idx+1)); } return new Combination(m); }
/** * Reverse operation of {@link #toString()}. */ public static Combination fromString(String id) { if(id.equals("default")) return new Combination(Collections.<String,String>emptyMap()); Map<String,String> m = new HashMap<String,String>(); StringTokenizer tokens = new StringTokenizer(id, ","); while(tokens.hasMoreTokens()) { String token = tokens.nextToken(); int idx = token.indexOf('='); if(idx<0) throw new IllegalArgumentException("Can't parse "+id); m.put(token.substring(0,idx),token.substring(idx+1)); } return new Combination(m); }
/** * Reverse operation of {@link #toString()}. */ public static Combination fromString(String id) { if(id.equals("default")) return new Combination(Collections.<String,String>emptyMap()); Map<String,String> m = new HashMap<String,String>(); StringTokenizer tokens = new StringTokenizer(id, DELIM); while(tokens.hasMoreTokens()) { String token = tokens.nextToken(); int idx = token.indexOf('='); if(idx<0) throw new IllegalArgumentException("Can't parse "+id); m.put(token.substring(0,idx),token.substring(idx+1)); } return new Combination(m); }
/** * Reverse operation of {@link #toString()}. */ public static Combination fromString(String id) { if(id.equals("default")) return new Combination(Collections.<String,String>emptyMap()); Map<String,String> m = new HashMap<String,String>(); StringTokenizer tokens = new StringTokenizer(id, DELIM); while(tokens.hasMoreTokens()) { String token = tokens.nextToken(); int idx = token.indexOf('='); if(idx<0) throw new IllegalArgumentException("Can't parse "+id); m.put(token.substring(0,idx),token.substring(idx+1)); } return new Combination(m); }
/** * Reverse operation of {@link #toString()}. */ public static Combination fromString(String id) { if (id.equals("default")) { return new Combination(Collections.<String, String>emptyMap()); } Map<String, String> m = new HashMap<String, String>(); StringTokenizer tokens = new StringTokenizer(id, DELIM); while (tokens.hasMoreTokens()) { String token = tokens.nextToken(); int idx = token.indexOf('='); if (idx < 0) { throw new IllegalArgumentException("Can't parse " + id); } m.put(token.substring(0, idx), token.substring(idx + 1)); } return new Combination(m); }
XmlFile config = Items.getConfigFile(v); if(config.exists()) { Combination comb = new Combination(c);
XmlFile config = Items.getConfigFile(v); if(config.exists()) { Combination comb = new Combination(c);
XmlFile config = Items.getConfigFile(v); if (config.exists()) { Combination comb = new Combination(c);
XmlFile config = Items.getConfigFile(v); if(config.exists()) { Combination comb = new Combination(c);
XmlFile config = Items.getConfigFile(v); if(config.exists()) { Combination comb = new Combination(c);
public Combination apply(@Nullable List<String> strings) { assert strings != null; return new Combination(axes, strings);