🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1266

Use of Collections

#1266
From: Shawn
Date: Tue, 19 Mar 2002 18:25
17 lines
1476 bytes
I'm a little lost on collections, I understand them if you use them on
simple objects like String, int, etc.  However, I want to use them for more
complex stuff and am lost.  I've read the Collections tutorial on
java.sun.com but it doesn't help.

For example, how do I write a collection of books?
class Book {
  String title;
  String author;
  String pubDate;
}
Do these elements have to be public for sorting, etc?
I'd prefer to use SortedSet to make searching for the book easier, but not
sure how to do that...

Thank you in advance!
Shawn
Technical Details
Message-ID: <a77vms$rvh$1@slb7.atl.mindspring.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!howland.erols.net!newsfeed.mindspring.net.MISMATCH!newsfeed0.news.atl.earthlink.net!news.atl.earthlink.net!news.mindspring.net!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,423738501aa46367,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-03-19 10:24:05 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!howland.erols.net!newsfeed.mindspring.net.MISMATCH!newsfeed0.news.atl.earthlink.net!news.atl.earthlink.net!news.mindspring.net!not-for-mail
From: "Shawn" <sstarkey@mindspring.com>
Newsgroups: borland.public.jbuilder.java.api
Subject: Use of Collections
Date: Tue, 19 Mar 2002 13:25:37 -0500
Organization: MindSpring Enterprises
Lines: 19
Message-ID: <a77vms$rvh$1@slb7.atl.mindspring.net>
NNTP-Posting-Host: a5.f7.40.b3
X-Server-Date: 19 Mar 2002 18:23:24 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700