Best code examples for Java 8 HashMap class (java.util.HashMap)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 HashMap class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 HashMap examples from Open Source projects
This code example shows how to use the following methods:
215:	streamMap = new HashMap<String, ArrayList<Integer>>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
14:	public static Map<String, DataParser> parsers = new HashMap<String, DataParser>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
13:	private Map<String, T> values = new HashMap<String, T>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: put
118:	Map<String, Object> temp = new HashMap<String, Object>(); 
119:	temp.put("title", name); 
120:	temp.put("intent", intent); 
121:	data.add(temp); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: put
78:	final Map<String, String> initialParameters = new HashMap<String, String>(); 
79:	initialParameters.put("javax.ws.rs.Application", "org.wildfly.extension.rts.jaxrs.VolatileParticipantApplication"); 
-
81:	final DeploymentInfo participantDeploymentInfo = getDeploymentInfo(DEPLOYMENT_NAME, CONTEXT_PATH, initialParameters); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods:
26:	protected HashMap<String, String> exceptions = new HashMap<String, String>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: put
28:	Map<String, Object> args = new HashMap<String,Object>(); 
29:	args.put("name", "Morten"); 
30:	assertThat( t.render( args ) ).isEqualTo("hello world: Morten"); 
-
33:	assertThat( t.render( args ) ).isEqualTo("hello world: Morten"); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: put
79:	final Map<String, String> initialParameters = new HashMap<String, String>(); 
80:	initialParameters.put("javax.ws.rs.Application", "org.wildfly.extension.rts.jaxrs.ParticipantApplication"); 
-
82:	final DeploymentInfo participantDeploymentInfo = getDeploymentInfo(DEPLOYMENT_NAME, CONTEXT_PATH, initialParameters); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: put
126:	HashMap<String, Object> config = new HashMap<>(); 
-
128:	config.put("precision", Arrays.asList(1, 2, 3, 4)); 
-
136:	config.put("default", pointAsMap); 
-
139:	GeolocationContextMapping mapping = GeolocationContextMapping.load("foo", config); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
56:	m = new HashMap<KeyColumn, S>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, put
95:	HashSet<Uri> msgBox = mMessageBoxes.get(msgBoxId); 
-
98:	mMessageBoxes.put(msgBoxId, msgBox); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: get, put, size
21:	Map<MetaqTopic, Boolean> map = new HashMap<MetaqTopic, Boolean>(); 
-
23:	map.put(metaQTopic1, true); 
-
27:	assertEquals(1, map.size()); 
28:	assertTrue(map.get(metaQTopic1)); 
29:	assertTrue(map.get(metaQTopic2)); 
-
31:	assertNull(map.get(metaQTopic2)); 
32:	assertTrue(map.get(metaQTopic1)); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: put
90:	Map<byte[], byte[]> bhash = new HashMap<byte[], byte[]>(); 
91:	bhash.put(bbar, bcar); 
92:	bhash.put(bcar, bbar); 
93:	String bstatus = jedis.hmset(bfoo, bhash); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods:
69:	headers = new HashMap<>(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: put, remove
394:	final Map<String, String> lmOptions = new HashMap<String, String>(); 
395:	final Builder loginModuleBuilder = new SecurityModule.Builder().name("UsersRoles").options(lmOptions); 
-
397:	lmOptions.put("usersProperties", PropertyFilesSetup.FILE_USERS.getAbsolutePath()); 
398:	lmOptions.put("rolesProperties", PropertyFilesSetup.FILE_ROLES.getAbsolutePath()); 
-
401:	lmOptions.remove("usersProperties"); 
402:	lmOptions.remove("rolesProperties"); 
403:	lmOptions.put("hashAlgorithm", "MD5"); 
-
406:	lmOptions.put("hashEncoding", "hex"); 
-
409:	lmOptions.put("hashEncoding", "base64"); 
-
412:	lmOptions.remove("hashEncoding"); 
413:	lmOptions.put("hashUserPassword", "false"); 
-
417:	lmOptions.put("hashUserPassword", "true"); 
-
421:	lmOptions.put("hashUserPassword", "false"); 
422:	lmOptions.put("hashStorePassword", "true"); 
-
426:	lmOptions.remove("hashUserPassword"); 
-
430:	lmOptions.remove("hashStorePassword"); 
431:	lmOptions.remove("hashAlgorithm"); 
432:	lmOptions.put("ignorePasswordCase", "true"); 
-
436:	lmOptions.put("ignorePasswordCase", "false"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: containsKey, get, size
119:	assertTrue(found.containsKey("jar.example.Class1"));  //$NON-NLS-1$ 
120:	assertTrue(found.containsKey("jar.example.Class2"));  //$NON-NLS-1$ 
121:	assertEquals(2, found.size()); 
-
126:	found.get("jar.example.Class1").get(0).getFullClassName());  //$NON-NLS-1$ 
127:	assertEquals(1, found.get("jar.example.Class1").size());      //$NON-NLS-1$ 
128:	assertEquals(0, found.get("jar.example.Class2").size());      //$NON-NLS-1$ 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: put
43:	private static final HashMap TYPES = new HashMap(); 
-
45:	TYPES.put(int.class, Tokens.INT); 
46:	TYPES.put(long.class, Tokens.LONG); 
47:	TYPES.put(float.class, Tokens.FLOAT); 
48:	TYPES.put(double.class, Tokens.REAL); 
49:	TYPES.put(boolean.class, Tokens.BOOLEAN); 
50:	TYPES.put(String.class, Tokens.STRING); 
51:	TYPES.put(Date.class, Tokens.DATE); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: put
43:	HashMap<String,EventListener> delegates = new HashMap<String,EventListener>(); 
-
46:	delegates.put(Classification.INFINISPAN.getLocalName(), new InfinispanCacheDeploymentListener()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
38:	private final Map<K, Long> loadingDates = Collections.synchronizedMap(new HashMap<K, Long>()); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: put
85:	Map<String, String> moduleOptionsMap = new HashMap<String, String>(); 
86:	moduleOptionsMap.put("roles", "role1,role2"); 
-
89:	createSecurityDomain(IdentityLoginModule.class, moduleOptionsMap, managementClient.getControllerClient()); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: put
36:	final Map<String, String> attrs = new HashMap<String, String>(); 
37:	attrs.put("key1", "val1"); 
38:	attrs.put("key2", "val2"); 
39:	attrs.put("key3", "val3"); 
-
44:	Assert.assertEquals(actual, attrs); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: put
13:	HashMap<String, Object> session = new HashMap<String, Object>(); 
-
16:	session.put("username", "anonymous"); 
17:	session.put("sessionid", UUID.randomUUID().toString()); 
18:	session.put("roles", new ArrayList<String>()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
190:	this.attr = new HashMap<>(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
46:	private final Map<Bitmap, Integer> valueSizes = Collections.synchronizedMap(new HashMap<Bitmap, Integer>()); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: put
135:	Map<String, Object> temp = new HashMap<String, Object>(); 
136:	temp.put("title", name); 
137:	temp.put("intent", intent); 
138:	data.add(temp); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: put
48:	BOMS = new LinkedHashMap<String, byte[]>(5); 
49:	BOMS.put("UTF-8", new byte[] { (byte) 0xEF, (byte) 0xBB, (byte) 0xBF }); 
50:	BOMS.put("UTF-32BE", new byte[] { (byte) 0x00, (byte) 0x00, (byte) 0xFE, (byte) 0xFF }); 
51:	BOMS.put("UTF-32LE", new byte[] { (byte) 0xFF, (byte) 0xFE, (byte) 0x00, (byte) 0x00 }); 
52:	BOMS.put("UTF-16BE", new byte[] { (byte) 0xFE, (byte) 0xFF }); 
53:	BOMS.put("UTF-16LE", new byte[] { (byte) 0xFF, (byte) 0xFE }); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
46:	private final Map<Bitmap, Integer> usingCounts = Collections.synchronizedMap(new HashMap<Bitmap, Integer>()); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
10:	private final HashMap<Character, CharacterSprite> chars = new HashMap<Character, CharacterSprite>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
17:	private final Map<String, Map<String, SessionEntry>> sessionData = Collections.synchronizedMap(new HashMap<String, Map<String, SessionEntry>>()); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
28:	public static Map<String, ChannelHandler> pipelines = new HashMap<String, ChannelHandler>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
14:	static final Map<String, String> symbols = new HashMap<String, String>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
33:	private static final Map<String, String> results = new HashMap<String, String>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
350:	public static Map<Integer,OFAndroidVideoGrabber> camera_instances = new HashMap<Integer,OFAndroidVideoGrabber>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
11:	private final Map<SdkConfig, SoftReference<SdkEnvironment>> sdkToEnvironmentSoft = new HashMap<SdkConfig, SoftReference<SdkEnvironment>>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
40:	private final Map<String, ServerUpdateResult> serverResults = new HashMap<String, ServerUpdateResult>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
34:	private Map<String, String> passwords = new HashMap<String, String>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
31:	private static final Map<Class<?>, Class<?>> primitives = new HashMap<Class<?>, Class<?>>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
45:	private final Map<QName, Object> parseResults = new HashMap<QName, Object>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
37:	private final Map<String, Set<String>> endpointHandlersMap = new HashMap<String, Set<String>>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
41:	private final Map<String, String> urlPatternToClassMapping = new HashMap<String, String>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
20:	private final Map<String,String> mimeTypes = new HashMap<>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
35:	private final Map<String, CommandHandler> handlers = new HashMap<String, CommandHandler>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
37:	private final Map<Class<?>, ClassReflectionIndex<?>> classes = new HashMap<Class<?>, ClassReflectionIndex<?>>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
28:	mCache = new HashMap<Integer, Drawable>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
48:	private Map<String, Object> options = new HashMap<String, Object>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
37:	private final Map<Class<?>, org.jboss.as.ejb3.tx.ApplicationExceptionDetails> applicationExceptions = new HashMap<Class<?>, org.jboss.as.ejb3.tx.ApplicationExceptionDetails>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
54:	this.interceptorData = new HashMap<String, Object>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
46:	private final Map<ModuleIdentifier, CompositeIndex> indexes = new HashMap<ModuleIdentifier, CompositeIndex>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
40:	static final private Map<String, Exporter> s_formatToExporter = new HashMap<String, Exporter>(); 
Full Snippet Info
10
CodeRank
Related Java 8 HashMap Questions & Answers:
Other Java 8 HashMap Examples
1:		 * Get stored session data
2:		 * */
3:		public HashMap<String, String> getUserDetails(){
4:			HashMap<String, String> user = new HashMap<String, String>();
5:			// user name
-
2:		 * */
3:		public HashMap<String, String> getUserDetails(){
4:			HashMap<String, String> user = new HashMap<String, String>();
5:			// user name
6:			user.put(KEY_NAME, pref.getString(KEY_NAME, null));
-
2:		 * */
3:		public HashMap<String, String> getUserDetails(){
4:			HashMaping> user = new HashMap<String, String>();
5:			// user name
6:			user.put(KEY_NAME, pref.getString(KEY_NAME, null));

Read More

30:				@Override
31:				public Map<String, String> getHeaders() throws AuthFailureError {
32:					HashMap<String, String> headers = new HashMap<String, String>();
33:					headers.put("Content-Type", "application/json");
34:					headers.put("apiKey", "xxxxxxxxxxxxxxx");
-
30:				@Override
31:				public Map<String, String> getHeaders() throws AuthFailureError {
32:					HashMap> headers = new HashMap<String, String>();
33:					headers.put("Content-Type", "application/json");
34:					headers.put("apiKey", "xxxxxxxxxxxxxxx");

Read More

24:				for (File file : home.listFiles(new FileExtensionFilter())) {
25:					HashMap<String, String> song = new HashMap<String, String>();
26:					song.put("songTitle", file.getName().substring(0, (file.getName().length() - 4)));
27:					song.put("songPath", file.getPath());
28:	
-
24:				for (File file : home.listFiles(new FileExtensionFilter())) {
25:					HashMap<String, String> song = new HashMap<String, String>();
26:					song.put("songTitle", file.getName().substring(0, (file.getName().length() - 4)));
27:					song.put("songPath", file.getPath());
28:

Read More

See Code Examples for Java 8 HashMap Methods: