org.hibernate.util

Class IdentitySet

Implemented Interfaces:
Set

public class IdentitySet
extends java.lang.Object
implements Set

Set implementation that use == instead of equals() as its comparison mechanism. This is achieved by internally using an IdentityHashMap.
Author:
Emmanuel Bernard

Constructor Summary

IdentitySet()
Create an IdentitySet with default sizing.
IdentitySet(int sizing)
Create an IdentitySet with the given sizing.

Method Summary

boolean
add(Object o)
boolean
addAll(Collection c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection c)
boolean
isEmpty()
Iterator
iterator()
boolean
remove(Object o)
boolean
removeAll(Collection c)
boolean
retainAll(Collection c)
int
size()
Object[]
toArray()
Object[]
toArray(Object[] a)

Constructor Details

IdentitySet

public IdentitySet()
Create an IdentitySet with default sizing.

IdentitySet

public IdentitySet(int sizing)
Create an IdentitySet with the given sizing.
Parameters:
sizing - The sizing of the set to create.

Method Details

add

public boolean add(Object o)

addAll

public boolean addAll(Collection c)

clear

public void clear()

contains

public boolean contains(Object o)

containsAll

public boolean containsAll(Collection c)

isEmpty

public boolean isEmpty()

iterator

public Iterator iterator()

remove

public boolean remove(Object o)

removeAll

public boolean removeAll(Collection c)

retainAll

public boolean retainAll(Collection c)

size

public int size()

toArray

public Object[] toArray()

toArray

public Object[] toArray(Object[] a)