/** * Gets an iterator for the collection mapped to the specified key. * * @param key the key to get an iterator for * @return the iterator of the collection at the key, empty iterator if key not in map */ public Iterator iterator(Object key) { if (!containsKey(key)) { return EmptyIterator.INSTANCE; } else { return new ValuesIterator(key); } }
/** * Gets an iterator for the collection mapped to the specified key. * * @param key the key to get an iterator for * @return the iterator of the collection at the key, empty iterator if key not in map */ public Iterator iterator(Object key) { if (!containsKey(key)) { return EmptyIterator.INSTANCE; } else { return new ValuesIterator(key); } }
private static void initBackend(final HugeGraph graph) throws InterruptedException { int retries = RETRIES; retry: do { try { graph.initBackend(); } catch (Exception e) { String clz = e.getClass().getSimpleName(); String message = e.getMessage(); if (exceptions.containsKey(clz) && retries > 0) { @SuppressWarnings("unchecked") Collection<String> keywords = exceptions.getCollection(clz); for (String keyword : keywords) { if (message.contains(keyword)) { LOG.info("Init failed with exception '{} : {}', " + "retry {}...", clz, message, RETRIES - retries + 1); Thread.sleep(RETRY_INTERVAL); continue retry; } } } throw e; } break; } while(retries-- > 0); } }
@Override public boolean haveService(String name) { return services.containsKey(name); }
/** * Gets an iterator for the collection mapped to the specified key. * * @param key the key to get an iterator for * @return the iterator of the collection at the key, empty iterator if key not in map */ public Iterator iterator(Object key) { if (!containsKey(key)) { return EmptyIterator.INSTANCE; } else { return new ValuesIterator(key); } }
/** * Gets an iterator for the collection mapped to the specified key. * * @param key the key to get an iterator for * @return the iterator of the collection at the key, empty iterator if key not in map */ public Iterator iterator(Object key) { if (!containsKey(key)) { return EmptyIterator.INSTANCE; } else { return new ValuesIterator(key); } }
/** * Gets an iterator for the collection mapped to the specified key. * * @param key the key to get an iterator for * @return the iterator of the collection at the key, empty iterator if key not in map */ public Iterator iterator(Object key) { if (!containsKey(key)) { return EmptyIterator.INSTANCE; } else { return new ValuesIterator(key); } }
/** * Gets an iterator for the collection mapped to the specified key. * * @param key the key to get an iterator for * @return the iterator of the collection at the key, empty iterator if key not in map */ public Iterator iterator(Object key) { if (!containsKey(key)) { return EmptyIterator.INSTANCE; } else { return new ValuesIterator(key); } }
/** * Gets an iterator for the collection mapped to the specified key. * * @param key the key to get an iterator for * @return the iterator of the collection at the key, empty iterator if key not in map */ public Iterator iterator(Object key) { if (!containsKey(key)) { return EmptyIterator.INSTANCE; } else { return new ValuesIterator(key); } }
public void setProperty(String key, String value) { if(properties.containsKey(key)) { properties.remove(key); } properties.put(key,value); } /**
public void setParameter(String name, String[] values) { if(parameterMap.containsKey(name)) parameterMap.remove(name); for (int i = 0; i < values.length; i++) { parameterMap.put("javax.portlet.prp_" + portletId + "_" + name, values[i]); } }
if (nameSpaceAliases.containsKey(id))
if (nameSpaceAliases.containsKey(id))
@Override public void groomServerRegistered(GroomServerStatus status) { Pair<String, Integer> key = new Pair<String, Integer>( status.getGroomHostName(), BSPMaster.resolveWorkerAddress( status.rpcServer).getPort()); LOG.debug("Received Groom From: " + key.getKey() + ":" + key.getValue()); if (assignments.containsKey(key)) { for (Object tip : assignments.getCollection(key)) { execute((TaskInProgress) tip, status); } } else { LOG.error("Unexpected host found: " + key.getKey() + ":" + key.getValue()); } groomServers.put(key, status); }
if (!roomIdUserIdRepository.getRoomIdUserIdMap().containsKey(roomId)) {
getDialogHandler()); MultiValueMap handlerParams = (MultiValueMap)handler.getConfiguration(); if ((handlerParams != null) && handlerParams.containsKey(PARAM_HIDEADVANCED)) { return false; if (handlerParams.containsKey(PARAM_SHOWGROUP)) {