Package org.grp1.model
Class Bucket
java.lang.Object
org.grp1.model.Bucket
- All Implemented Interfaces:
NodeChild
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe function to return the addressed inside of this bucketintgetKey()The function to return the key of this bucketvoidinsertAddress(Address newAddress) The function to insert the address inside bucket
-
Field Details
-
arr
The array of address inside of this bucket -
key
private final int keyThe key corresponding to this bucket
-
-
Constructor Details
-
Bucket
public Bucket(int key) The constructor to instantiate the bucket object- Parameters:
key- The key of the bucket
-
Bucket
The constructor to instantiate the bucket object- Parameters:
key- The key of the bucketarr- The list of address
-
-
Method Details
-
getKey
public int getKey()The function to return the key of this bucket -
insertAddress
The function to insert the address inside bucket- Parameters:
newAddress- The address to be inserted inside of this bucket
-
getAddresses
The function to return the addressed inside of this bucket- Returns:
- The list of addresses of the bucket
-