/** * Check whether a value exists in the set. * * @param key The value to search for. * @return Returns true if the value exists, else false. */ @Override public boolean contains(Object key) { return indexOf(key) >= 0; }
/** * Returns the index of a value in the set. * * @param key The value to search for. * @return Returns the index of the value if it exists, else a negative integer. */ public int indexOf(Object key) { return key == null ? indexOfNull() : indexOf(key, key.hashCode()); }
} else { hash = value.hashCode(); index = indexOf(value, hash);
@Override protected int colIndexOfKey(Object key) { return indexOf(key); }
/** * Returns the index of a value in the set. * * @param key The value to search for. * @return Returns the index of the value if it exists, else a negative integer. */ public int indexOf(Object key) { return key == null ? indexOfNull() : indexOf(key, key.hashCode()); }
@Override protected int colIndexOfValue(Object value) { return indexOf(value); }
/** * Returns the index of a value in the set. * * @param key The value to search for. * @return Returns the index of the value if it exists, else a negative integer. */ public int indexOf(Object key) { return key == null ? indexOfNull() : indexOf(key, key.hashCode()); }
/** * Removes the specified object from this set. * * @param object the object to remove. * @return {@code true} if this set was modified, {@code false} otherwise. */ @Override public boolean remove(Object object) { final int index = indexOf(object); if (index >= 0) { removeAt(index); return true; } return false; }
} else { hash = value.hashCode(); index = indexOf(value, hash);
/** * Check whether a value exists in the set. * * @param key The value to search for. * @return Returns true if the value exists, else false. */ @Override public boolean contains(Object key) { return indexOf(key) >= 0; }
} else { hash = value.hashCode(); index = indexOf(value, hash);
/** * Check whether a value exists in the set. * * @param key The value to search for. * @return Returns true if the value exists, else false. */ @Override public boolean contains(Object key) { return indexOf(key) >= 0; }
@Override protected int colIndexOfValue(Object value) { return indexOf(value); }
@Override protected int colIndexOfKey(Object key) { return indexOf(key); }
@Override protected int colIndexOfValue(Object value) { return indexOf(value); }
@Override protected int colIndexOfKey(Object key) { return indexOf(key); }
/** * Removes the specified object from this set. * * @param object the object to remove. * @return {@code true} if this set was modified, {@code false} otherwise. */ @Override public boolean remove(Object object) { final int index = indexOf(object); if (index >= 0) { removeAt(index); return true; } return false; }
/** * Removes the specified object from this set. * * @param object the object to remove. * @return {@code true} if this set was modified, {@code false} otherwise. */ @Override public boolean remove(Object object) { final int index = indexOf(object); if (index >= 0) { removeAt(index); return true; } return false; }