예제 #1
0
  public boolean insert(E x) {
    FHlinkedList<E> theList = mLists[myHash(x)];

    if (theList.contains(x)) return false;

    // not found so we insert
    theList.addLast(x);

    // check load factor
    if (++mSize > mMaxLambda * mTableSize) rehash();

    return true;
  }
예제 #2
0
  public boolean contains(E x) {
    FHlinkedList<E> theList = mLists[myHash(x)];

    return theList.contains(x);
  }