Code examples for HashSet

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
15:	public Set<CompositeIdEntity> a2Bs = new HashSet<CompositeIdEntity>(); 
Full Snippet Info
9
CodeRank
15:	public Set<CompositeIdEntity> a2Bs = new HashSet<CompositeIdEntity>(); 
Full Snippet Info
9
CodeRank
221:	Set<Method> methods = new HashSet<Method>(); 
222:	methods.addAll(Arrays.asList(getMethods(type))); 
223:	methods.addAll(Arrays.asList(getMethods(targetObject.getClass()))); 
224:	return methods.toArray(new Method[methods.size()]); 
Full Snippet Info
8
CodeRank
43:	private final Set<String> tags = new HashSet<String>(); 
Full Snippet Info
9
CodeRank
38:	return new HashSet<Object>(); 
Full Snippet Info
9
CodeRank
153:	final Set<Class<? extends DatabaseObject>> compareTypes = new HashSet<>(); 
-
156:	compareTypes.add(Column.class); 
-
159:	compareTypes.add(Data.class); 
-
162:	compareTypes.add(ForeignKey.class); 
-
165:	compareTypes.add(Index.class); 
-
168:	compareTypes.add(PrimaryKey.class); 
-
171:	compareTypes.add(Sequence.class); 
-
174:	compareTypes.add(Table.class); 
-
177:	compareTypes.add(UniqueConstraint.class); 
-
180:	compareTypes.add(View.class); 
-
189:	generateChangeLog(database, database.getDefaultSchema(), diffToChangeLog, file, compareTypes); 
-
192:	generateChangeLog(database, database.getDefaultSchema(), diffToChangeLog, System.out, compareTypes); 
Full Snippet Info
7
CodeRank
382:	Set<String> usedParams = new HashSet<String>(); 
-
389:	String uri = tag.replaceUriTemplateParams("url/{name}", params, 
-
393:	assertEquals(1, usedParams.size()); 
394:	assertTrue(usedParams.contains("name")); 
Full Snippet Info
7
CodeRank
24:	private static HashSet<Class<?>> exceptionWhitelist = new HashSet<Class<?>>(); 
-
30:	exceptionWhitelist.add(NoHttpResponseException.class); 
-
32:	exceptionWhitelist.add(UnknownHostException.class); 
-
34:	exceptionWhitelist.add(SocketException.class); 
Full Snippet Info
7
CodeRank
32:	private Set<TInjectee> injectees = new HashSet<TInjectee>(); 
Full Snippet Info
9
CodeRank
57:	Set<String> scopes = new HashSet<String>(); 
58:	scopes.addAll(Arrays.asList("read", "write")); 
59:	OAuth2Request storedOAuth2Request = RequestTokenFactory.createOAuth2Request("client", false, scopes); 
Full Snippet Info
7
CodeRank
170:	new HashSet<Class<? extends ApplicationContextInitializer<? extends ConfigurableApplicationContext>>>(); 
171:	initializerClasses1.add(FooInitializer.class); 
172:	initializerClasses1.add(BarInitializer.class); 
-
179:	MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(), EMPTY_STRING_ARRAY, 
Full Snippet Info
7
CodeRank
45:	Set<PublishArtifact> artifacts = new HashSet<PublishArtifact>(); 
46:	artifacts.addAll(attachedArtifacts); 
-
48:	artifacts.add(mainArtifact); 
-
50:	artifacts.add(pomArtifact); 
Full Snippet Info
7
CodeRank
32:	Set<Tag> tags = new HashSet<Tag>(); 
33:	tags.addAll(cucumberFeature.getGherkinFeature().getTags()); 
34:	tags.addAll(gherkinModel.getTags()); 
Full Snippet Info
7
CodeRank
34:	private Set<String> nickNames = new HashSet<String>(); 
Full Snippet Info
9
CodeRank
46:	final Set<?> set = new HashSet<Object>(); 
47:	Assert.isInstanceOf(HashSet.class, set); 
48:	Assert.isInstanceOf(HashMap.class, set); 
Full Snippet Info
7
CodeRank
212:	Set<FieldValueProvider> fieldValueProviders = new HashSet<>(); 
-
214:	fieldValueProviders.addAll(globalInternalFieldValueProviders); 
215:	fieldValueProviders.add(KafkaInternalFieldDescription.SEGMENT_COUNT_FIELD.forLongValue(totalMessages)); 
216:	fieldValueProviders.add(KafkaInternalFieldDescription.PARTITION_OFFSET_FIELD.forLongValue(messageAndOffset.offset())); 
217:	fieldValueProviders.add(KafkaInternalFieldDescription.MESSAGE_FIELD.forByteValue(messageData)); 
218:	fieldValueProviders.add(KafkaInternalFieldDescription.MESSAGE_LENGTH_FIELD.forLongValue(messageData.length)); 
219:	fieldValueProviders.add(KafkaInternalFieldDescription.KEY_FIELD.forByteValue(keyData)); 
220:	fieldValueProviders.add(KafkaInternalFieldDescription.KEY_LENGTH_FIELD.forLongValue(keyData.length)); 
221:	fieldValueProviders.add(KafkaInternalFieldDescription.KEY_CORRUPT_FIELD.forBooleanValue(keyDecoder.decodeRow(keyData, null, fieldValueProviders, columnHandles, keyFieldDecoders))); 
222:	fieldValueProviders.add(KafkaInternalFieldDescription.MESSAGE_CORRUPT_FIELD.forBooleanValue(messageDecoder.decodeRow(messageData, null, fieldValueProviders, columnHandles, messageFieldDecoders))); 
-
231:	for (FieldValueProvider fieldValueProvider : fieldValueProviders) { 
Full Snippet Info
7
CodeRank
127:	target = new HashSet<String>(target); 
128:	target.retainAll(members); 
129:	return target.size() == members.size(); 
Full Snippet Info
7
CodeRank
80:	Set<Resource> result = new HashSet<Resource>(); 
Full Snippet Info
7
CodeRank
34:	Set<Tag> tags = new HashSet<Tag>(); 
35:	tags.addAll(cucumberScenarioOutline.tagsAndInheritedTags()); 
36:	tags.addAll(examples.getTags()); 
Full Snippet Info
7
CodeRank
137:	Set<Long> set = new HashSet<>(); 
-
140:	assertEquals(typedSet.contains(longBlock, blockPosition), set.contains(number)); 
141:	assertEquals(typedSet.size(), set.size()); 
-
143:	set.add(number); 
-
146:	assertEquals(typedSet.contains(longBlock, blockPosition), set.contains(number)); 
147:	assertEquals(typedSet.size(), set.size()); 
Full Snippet Info
7
CodeRank