Stephan Nagy wrote:
> Robert Burrell Donkin wrote:
>
> > "RESTREPO, ALEXANDER G [Non-Pharmacia/1000]" wrote:
> >
> > > Hello Everyone:
> > >
> > > Does anybody know of a method or technique
> > > to determine if a ElementContainer or any other
> > > ECS Element is empty, i.e., it contains no Elements?
> >
> > this isn't very pretty code but it works for me
> >
> > public boolean isEmpty(org.apache.ecs.ConcreteElement element)
> > {
> > return !(element.keys().hasMoreElements();
> > }
> >
> > i believe that it should be possible to add a better isEmpty() method to the
> > ConcreteElement
> > and maybe that'd be a bit better.
> > don't know what other people think.
> >
>
> You could add something like that into the base class or do :
>
> if(this.keys() == null) { ... } // element is empty
>
> Pretty sure that will work.
maybe i'll have a look at testing this.
- robert
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]