public void testCreateFromSize() { LinkedListMultimap<String, Integer> multimap = LinkedListMultimap.create(20); multimap.put("foo", 1); multimap.put("bar", 2); multimap.put("foo", 3); assertEquals(ImmutableList.of(1, 3), multimap.get("foo")); }
public void testLinkedGetAdd() { LinkedListMultimap<String, Integer> map = create(); map.put("bar", 1); Collection<Integer> foos = map.get("foo"); foos.add(2); foos.add(3); map.put("bar", 4); map.put("foo", 5); assertEquals("{bar=[1, 4], foo=[2, 3, 5]}", map.toString()); assertEquals("[bar=1, foo=2, foo=3, bar=4, foo=5]", map.entries().toString()); }
int component = 0; for (Integer key : componentCoordinates.keySet()) { List<Coordinate> coords = componentCoordinates.get(key); Coordinate[] coordArray = new Coordinate[coords.size()]; ConvexHull hull = new ConvexHull(coords.toArray(coordArray), GeometryUtils.getGeometryFactory());
@Override public List<String> getHints() { return Config.hints.get("treealyzer"); } }
@Override public List<String> getHints() { return Config.hints.get("flutterlyzer"); } }
@Override public List<String> getHints() { return Config.hints.get("beealyzer"); }
@Override public List<String> getHints() { return Config.hints.get("flutterlyzer"); } }
VspDomain vspDomain = _nuageVspEntityBuilder.buildVspDomain(_domainDao.findById(domainId)); VspNetwork vspNetworkForDomain = new VspNetwork.Builder().fromObject(vspNetwork).domain(vspDomain).build(); List<VspDhcpVMOption> dhcpOptions = dhcpOptionsPerDomain.get(domainId); UpdateDhcpOptionVspCommand cmd = new UpdateDhcpOptionVspCommand(dhcpOptions, vspNetworkForDomain); Answer answer = _agentMgr.easySend(nuageVspHost.getId(), cmd);
@SuppressWarnings("unchecked") @Override public Collection<V> get(@Nullable Object key) { Collection<V> collection = LinkedListMultimap.this.get((K) key); return collection.isEmpty() ? null : collection; }
@SuppressWarnings("unchecked") @Override public Collection<V> get(@Nullable Object key) { Collection<V> collection = LinkedListMultimap.this.get((K) key); return collection.isEmpty() ? null : collection; }
@SuppressWarnings("unchecked") @Override public Collection<V> get(@Nullable Object key) { Collection<V> collection = LinkedListMultimap.this.get((K) key); return collection.isEmpty() ? null : collection; }
@SuppressWarnings("unchecked") @Override public Collection<V> get(@Nullable Object key) { Collection<V> collection = LinkedListMultimap.this.get((K) key); return collection.isEmpty() ? null : collection; }
@SuppressWarnings("unchecked") @Override public Collection<V> get(@Nullable Object key) { Collection<V> collection = LinkedListMultimap.this.get((K) key); return collection.isEmpty() ? null : collection; }
protected final void addHintLedger(String hintsKey) { if (Config.enableHints) { List<String> hints = Config.hints.get(hintsKey); addHintLedger(hints); } }
static long getExpires(URI uri) { LinkedListMultimap<String, String> params = parseUriParameters(uri); List<String> expires = params.get(HttpKeys.EXPIRES); if (expires != null && !expires.isEmpty()) { return Long.parseLong(expires.get(0)); } return 0; } }
static long getExpires(URI uri) { LinkedListMultimap<String, String> params = parseUriParameters(uri); List<String> expires = params.get(HttpKeys.EXPIRES); if (expires != null && !expires.isEmpty()) { return Long.parseLong(expires.get(0)); } return 0; } }
@Override public List<ImmutableTransition<T, S, E, C>> getTransitions(E event) { if(transitions==null) return Collections.emptyList(); return Lists.newArrayList(getTransitions().get(event)); }
static long getExpires(URI uri) { LinkedListMultimap<String, String> params = Utils.parseUriParameters(uri); List<String> expires = params.get(Common.EXPIRES); if (expires != null && !expires.isEmpty()) { return Long.parseLong(expires.get(0)); } return 0; } }
public void testLinkedGetAdd() { LinkedListMultimap<String, Integer> map = create(); map.put("bar", 1); Collection<Integer> foos = map.get("foo"); foos.add(2); foos.add(3); map.put("bar", 4); map.put("foo", 5); assertEquals("{bar=[1, 4], foo=[2, 3, 5]}", map.toString()); assertEquals("[bar=1, foo=2, foo=3, bar=4, foo=5]", map.entries().toString()); }