gr.uoa.di.madgik.searchlibrary.operatorlibrary.join
Class HashJoin

java.lang.Object
  extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.join.HashJoin

public class HashJoin
extends Object

Class used to hold the hashtable for the hash join algorithm

Author:
UoA

Constructor Summary
HashJoin()
          Creates a new HashJoin
 
Method Summary
 void add(JoinElement elem)
          Adds the provided element in the hashtable
 boolean isEmpty()
          Checks if the hashtable is empty
 JoinElement lookup(JoinElement elem)
          Checks if the provided element exists in the hashtable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashJoin

public HashJoin()
Creates a new HashJoin

Method Detail

lookup

public JoinElement lookup(JoinElement elem)
Checks if the provided element exists in the hashtable

Parameters:
elem - The element to lookup
Returns:
The element that is stored in the hashtable if it exists, null otherwise

add

public void add(JoinElement elem)
Adds the provided element in the hashtable

Parameters:
elem - The element to add

isEmpty

public boolean isEmpty()
Checks if the hashtable is empty

Returns:
true if it is, false otherwise


Copyright © 2013. All Rights Reserved.