Re: Java compatibility issues (WAS: MF having issues?)
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxx>
- Date: Sat, 4 Mar 2006 22:52:06 +1300
"James J. Gavan" <jgavandeletethis@xxxxxxx> wrote in message
news:Am5Of.97656$B94.27605@xxxxxxxxxxx
<snipped>> --------------------------------------------------
SEARCH - I never used to use it, then asked here. I don't know whether or
not the topic was 'SEARCH' but go back through the archives, some years
ago - you'll get lots of decent tips. Briefly, get your list in a
meaningful ascending sequence, and indexing gives you very good
performance.
Can't use it with OO COBOL for which you need to compare - bearing in mind
it's only F/J and M/F that have self-contained OO support.
I beg to differ. I have OO COBOL that uses SEARCH with no problems
whatsoever.
Not sure what you are getting at here, Jimmy.
SortedCollection - querying your collection size you can do a binary chop
to reduce the number of elements being compared
Obviously collections are implemented differently by different vendors. I
would not search the collection to get the size of it. The Collection object
has the number of elements in the collection as a property. (That is using
the Fujitsu NODE collection. So does VB) If I'm building my own collection,
there is a factory global that has the number of elements and it is added to
when an add method is invoked successfully and subtracted from when an item
is removed succesfully.)
OrderedCollection (sequential) - really means going through all elements
So, can you explain why you differentiate between a sorted collection and an
ordered one? Do you mean the sorted one was created randomly then sorted?
Was the ordered one created and maintained in sequence? When it comes to
searching, there should be no difference, except that if the sorted one was
created chronologically, then the item numbers for the elements would not
necessarily be sequential after it was sorted, whereas with the ordered one
they should be (we could expect the whole set to be renumbered from the
point of insertion if an item was inserted.)
Now THIS you could use a binary chop on... whether you searched by key or
item number.
until you find the one you want - using a callbackI think this is a MicroFocus term. I'm not familiar with it.
Dictionary(Your Java Maps) - Invoke myCollection "includesKey" using
thisKey returning Boolean
Pete.
.
- Follow-Ups:
- Re: Java compatibility issues (WAS: MF having issues?)
- From: James J. Gavan
- Re: Java compatibility issues (WAS: MF having issues?)
- References:
- Re: MF having issues?
- From: Jeff York
- Re: MF having issues?
- From: Frank Swarbrick
- Re: MF having issues?
- From: Jeff York
- Re: MF having issues?
- From: Sergey Kashyrin
- Re: MF having issues?
- From: James J. Gavan
- OT: Java compatibility issues (WAS: MF having issues?)
- From: Oliver Wong
- Re: Java compatibility issues (WAS: MF having issues?)
- From: Sergey Kashyrin
- Re: Java compatibility issues (WAS: MF having issues?)
- From: James J. Gavan
- Re: Java compatibility issues (WAS: MF having issues?)
- From: Sergey Kashyrin
- Re: Java compatibility issues (WAS: MF having issues?)
- From: James J. Gavan
- Re: Java compatibility issues (WAS: MF having issues?)
- From: Howard Brazee
- Re: Java compatibility issues (WAS: MF having issues?)
- From: Oliver Wong
- Re: Java compatibility issues (WAS: MF having issues?)
- From: James J. Gavan
- Re: MF having issues?
- Prev by Date: Re: MF having issues?
- Next by Date: Re: HTML (WAS: MF having issues?)
- Previous by thread: Re: Java compatibility issues (WAS: MF having issues?)
- Next by thread: Re: Java compatibility issues (WAS: MF having issues?)
- Index(es):
Relevant Pages
|
Loading