set
7 tutorials tagged “set”.
- HashSet Internal WorkingHashSet is built on a HashMap: each element is stored as a key with a dummy value. Learn how add, contains and remove work inside, with a small rebuild.
- EnumSet in JavaEnumSet is a very fast, compact Set for enum values. Learn how to create one with of, allOf, noneOf, range and complementOf, with examples.
- HashSet in JavaHashSet stores unique elements in a hash table with fast add, remove and contains. Learn its features, methods, ordering, and the equals and hashCode rule.
- LinkedHashSet in JavaLinkedHashSet is a HashSet that remembers insertion order. Learn how it works, its methods, and when to choose it over HashSet and TreeSet.
- TreeSet in JavaTreeSet stores unique elements in sorted order using a red-black tree. Learn its constructors, methods, custom ordering, and its rules about null.
- Set Interface in JavaThe Set interface represents a collection with no duplicate elements. Learn its features, implementations, set operations and examples.
- SortedSet and NavigableSet in JavaSortedSet keeps elements sorted and NavigableSet adds closest-match searches. Learn first, last, headSet, tailSet, floor, ceiling and more.