/** * Returns an iterator of the {@code String} names in this object. The returned iterator supports * {@link Iterator#remove() remove}, which will remove the corresponding mapping from this object. * If this object is modified after the iterator is returned, the iterator's behavior is * undefined. The order of the keys is undefined. * * @return an iterator over the keys. */ public Iterator<String> keys() { return nameValuePairs.keySet().iterator(); }
/** * Returns a string representation of the annotation. */ public String toString() { StringBuffer buf = new StringBuffer("@"); buf.append(getTypeName()); if (members != null) { buf.append("("); Iterator mit = members.keySet().iterator(); while (mit.hasNext()) { String name = (String)mit.next(); buf.append(name).append("=").append(getMemberValue(name)); if (mit.hasNext()) buf.append(", "); } buf.append(")"); } return buf.toString(); }
LinkedHashMap<String, String> map = new LinkedHashMap<String, String>(); if (zoom != NO_ZOOM) map.put("z", String.valueOf(zoom)); if (query != null) map.put("q", URLEncoder.encode(query)); if (label != null) if (query == null) map.put("q", latlon + "(" + URLEncoder.encode(label) + ")"); if (map.size() > 0) uriString += "?"; int i = 0; for (String key : map.keySet()) { if (i > 0) uriString += "&"; uriString += key + "=" + map.get(key); i++;
Integer counter = aggregatedCommandsExecuted.get(display); if( counter != null){ aggregatedCommandsExecuted.put(display, counter + 1); } else { aggregatedCommandsExecuted.put(display, 1); for (String displayString : aggregatedCommandsExecuted.keySet()) { if (builder.length() > 0) { builder.append(", "); builder.append("[").append(totalExecutionTime).append("ms]"); int count = aggregatedCommandsExecuted.get(displayString); if (count > 1) { builder.append("x").append(count);
if (superclass != null) { ClassProto superclassProto = (ClassProto) classPath.getClass(superclass); for (String superclassInterface: superclassProto.getInterfaces().keySet()) { interfaces.put(superclassInterface, null); for (Entry<String, ClassDef> entry: interfaceProto.getInterfaces().entrySet()) { if (!interfaces.containsKey(entry.getKey())) { interfaces.put(entry.getKey(), entry.getValue()); interfaces.put(interfaceType, null); unresolvedInterfaces.add(interfaceType); interfacesFullyResolved = false;
/** * Construct this security domain. * * Construction requires {@code createSecurityDomain} {@link ElytronPermission}. * * @return the new security domain */ public SecurityDomain build() { final SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission(CREATE_SECURITY_DOMAIN); } final LinkedHashMap<String, RealmInfo> realmMap = new LinkedHashMap<>(realms.size()); for (RealmBuilder realmBuilder : realms.values()) { realmMap.put(realmBuilder.getName(), new RealmInfo(realmBuilder)); } if (defaultRealmName != null && !realmMap.containsKey(defaultRealmName)) { throw log.realmMapDoesNotContainDefault(defaultRealmName); } assertNotBuilt(); built = true; if(log.isTraceEnabled()) { log.tracef("Building security domain with defaultRealmName %s.", defaultRealmName); if(realmMap.size() > 1) { log.tracef("The following additional realms were added: %s.", realmMap.keySet().toString()); } } return new SecurityDomain(this, realmMap); }
List<Path> pathsToAdd = new LinkedList<Path>(); for (String alias : work.getAliasToWork().keySet()) { LOG.info("Processing alias " + alias); boolean hasLogged = false; for (Path file : new LinkedList<Path>(work.getPathToAliases().keySet())) { List<String> aliases = work.getPathToAliases().get(file); if (aliases.contains(alias)) { if (file != null) { } else if (!hasLogged) { hasLogged = true; LOG.info("Adding " + work.getPathToAliases().size() + " inputs; the first input is " + file);
@Override protected void doSample() { StringBuilder stringBuilder = new StringBuilder(); for (StackTraceElement stackTraceElement : mCurrentThread.getStackTrace()) { stringBuilder .append(stackTraceElement.toString()) .append(BlockInfo.SEPARATOR); } synchronized (sStackMap) { if (sStackMap.size() == mMaxEntryCount && mMaxEntryCount > 0) { sStackMap.remove(sStackMap.keySet().iterator().next()); } sStackMap.put(System.currentTimeMillis(), stringBuilder.toString()); } } }
map.put( rowMetaAndData, new TimedRow( add ) ); if ( !meta.isLoadingAllDataInCache() && meta.getCacheSize() > 0 && map.size() > meta.getCacheSize() ) { List<RowMetaAndData> keys = new ArrayList<RowMetaAndData>( map.keySet() ); List<Date> samples = new ArrayList<Date>(); int incr = keys.size() / 10; TimedRow timedRow = map.get( key ); samples.add( timedRow.getLogDate() ); TimedRow timedRow = map.get( key );
for (MethodDescription methodDescription : typeDescription.getDeclaredMethods()) { if (!declaredMethods.contains(methodDescription)) { implementations.put(methodDescription, entry.asSupplementaryEntry(methodDescription)); declaredMethods.add(methodDescription); ElementMatcher<? super MethodDescription> relevanceMatcher = (ElementMatcher<? super MethodDescription>) not(anyOf(implementations.keySet())) .and(returns(isVisibleTo(instrumentedType))) .and(hasParameters(whereNone(hasType(not(isVisibleTo(instrumentedType)))))) for (Entry entry : entries) { if (entry.resolve(instrumentedType).matches(methodDescription)) { implementations.put(methodDescription, entry.asPreparedEntry(instrumentedType, methodDescription, node.getMethodTypes(), && methodDescription.getDeclaringType().isPackagePrivate()) { implementations.put(methodDescription, Prepared.Entry.forVisibilityBridge(methodDescription, node.getVisibility()));