Prism.util
Class AddressList

java.lang.Object
  |
  +--Prism.util.AddressList

public class AddressList
extends java.lang.Object

The AddressList class can manage a list of assigned addresses and It supports allocation and deallocation of addresses.


Constructor Summary
AddressList(Address start, int reserved)
          Constructor for address list of reserved addresses to create a list of addresses starting at start
 
Method Summary
 int getFreeCount()
           
 Address getNextAddress()
          Obtain the next available address in the range of assigned addresses
 int getRange()
           
 void releaseAddress(Address free)
          Put back an unused address into the available range
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddressList

public AddressList(Address start,
                   int reserved)
Constructor for address list of reserved addresses to create a list of addresses starting at start
Parameters:
start - Address at which to start the range
reserved - int number of addresses to add to the list
Method Detail

getNextAddress

public Address getNextAddress()
Obtain the next available address in the range of assigned addresses
Returns:
Address Next available address from assigned range

releaseAddress

public void releaseAddress(Address free)
Put back an unused address into the available range
Parameters:
free - Address that is free for use

getRange

public int getRange()

getFreeCount

public int getFreeCount()