It's a fixed-size HashMap.
It overrides HashMap's put method to check if the
HashMap is full, and if it is it throws an exception.
It also has boolean isFull() method that returns true
when the HashMap's size() == maximum size of
BoundHashMap.
This won't help you directly, although it can serve as
an example for overriding HashMap's put method.

Otis

--- "Richard R. McKinley"
<[EMAIL PROTECTED]> wrote:
> I'm not an expert in collections, etc.  What is the
> BoundHashMap?  Will it
> help with what I'm trying to do?
> 
> Thanks,
> 
> Richard
> ----- Original Message -----
> From: "Otis Gospodnetic"
> <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 19, 2001 10:53 AM
> Subject: A few collections for Jakarta Commons (was:
> Re: one-to-many
> Container)
> 
> 
> > Hello,
> >
> > Well, I have a few things that may then be
> suitable
> > for Jakarta Commons collections. Here is a list of
> > classes from my 'ADT dir'. You should be able to
> guess
> > the functionality from the name. If you can't
> figure
> > it out, then I gave them poor names.
> >
> > BoundHashMap.java
> > BoundHashMapFullException.java
> > BoundLinkedListQueue.java
> > BoundLinkedListQueueException.java
> > CircularArrayQueue.java
> > CircularArrayQueueException.java
> > LinkedListQueue.java
> > Queue.java (this is just an interface)
> > QueueException.java
> > UniqueBoundLinkedListQueue.java
> > UniqueLinkedListQueue.java
> >
> > If those are suitable for Jakarta Commons
> collections
> > please let me know how to get them in there, or
> who to
> > send them to.
> >
> > Otis
> >
> > --- James Strachan <[EMAIL PROTECTED]>
> wrote:
> > > From: "Otis Gospodnetic"
> > > <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, June 19, 2001 5:29 PM
> > > Subject: Re: one-to-many Container
> > >
> > >
> > > > Couldn't you just store values for a single
> key in
> > > a
> > > > list (ArrayList, LinkedList, Vector)?
> > > > Extend HashMap and write your own
> > > put(Object,Object)
> > > > method that knows how to add to the existing
> list
> > > for
> > > > existing key, or create a new list for a new
> key
> > > being
> > > > put in the HashMap.
> > >
> > > This sounds like a good possible addition to the
> > > Jakarta collections project
> > > ;-)
> > >
> > > You might also want to change the implementation
> of
> > > values() so that you
> > > could iterate through all logical values in the
> Map
> > > as one flat collection.
> > >
> > > James
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Spot the hottest trends in music, movies, and
> more.
> > http://buzz.yahoo.com/
> >
> 


__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/

Reply via email to