netcom.util
Class BloomUpdate

java.lang.Object
  extended bynetcom.util.BloomUpdate

public class BloomUpdate
extends java.lang.Object

Title: Bloom Update Packet

Description: This object holds an index list of bits which should be flipped from an origional BloomFilter. It also holds a Datagram Packet with this information encoded as well

Copyright: Copyright (c) 2002

Company: NETCOM

See Also:
BloomFilter

Constructor Summary
BloomUpdate(java.net.DatagramPacket bloom_packet)
          constructor to create a BloomUpdate object from an incoming datagram packet that has been created from another BloomUpdate object
BloomUpdate(int[] changed_indexes)
          Constructor to create a BloomUpdate object from a predefined array of changed indexes
 
Method Summary
 java.net.DatagramPacket getDatagram(AddressPort dest_address)
          Getter to actually get the Datagram Packet representation of this BloomUpdate
 int[] getIndexList()
          Getter method to retrieve the ArrayList of flipped indexes
 int getPort()
          Getter method for the port
 java.lang.String toString()
          toString() method for debugging purposes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BloomUpdate

public BloomUpdate(int[] changed_indexes)
Constructor to create a BloomUpdate object from a predefined array of changed indexes

Parameters:
changed_indexes - int array representing changed indexes

BloomUpdate

public BloomUpdate(java.net.DatagramPacket bloom_packet)
constructor to create a BloomUpdate object from an incoming datagram packet that has been created from another BloomUpdate object

Parameters:
bloom_packet - The incoming datagram packet
Method Detail

getPort

public int getPort()
Getter method for the port


getDatagram

public java.net.DatagramPacket getDatagram(AddressPort dest_address)
Getter to actually get the Datagram Packet representation of this BloomUpdate


getIndexList

public int[] getIndexList()
Getter method to retrieve the ArrayList of flipped indexes

Returns:
List of flipped indexes (unmodifiable)

toString

public java.lang.String toString()
toString() method for debugging purposes