com.carrotsearch.hppc
Interface ShortSet

All Superinterfaces:
java.lang.Iterable<ShortCursor>, ShortCollection, ShortContainer
All Known Implementing Classes:
ShortOpenHashSet

@Generated(date="2011-07-12T16:58:51+0200",
           value="HPPC generated from: ShortSet.java")
public interface ShortSet
extends ShortCollection

A set of shorts.


Method Summary
 boolean add(short k)
          Adds k to the set.
 boolean equals(java.lang.Object obj)
          Compares the specified object with this set for equality.
 int hashCode()
           
 
Methods inherited from interface com.carrotsearch.hppc.ShortCollection
clear, removeAll, removeAll, removeAllOccurrences, retainAll, retainAll
 
Methods inherited from interface com.carrotsearch.hppc.ShortContainer
contains, forEach, forEach, isEmpty, iterator, size, toArray
 

Method Detail

add

boolean add(short k)
Adds k to the set.

Returns:
Returns true if this element was not part of the set before. Returns false if an equal element is part of the set, and replaces the existing equal element with the argument (if keys are object types).

equals

boolean equals(java.lang.Object obj)
Compares the specified object with this set for equality. Returns true if and only if the specified object is also a ObjectSet and both objects contains exactly the same objects.

Overrides:
equals in class java.lang.Object

hashCode

int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
A hash code of elements stored in the set. The hash code is defined identically to Set.hashCode() (sum of hash codes of elements within the set). Because sum is commutative, this ensures that different order of elements in a set does not affect the hash code.


Copyright © 2011 Carrot Search s.c.. All Rights Reserved.