Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 17th, 2005, 10:46 AM
kpsiddharth kpsiddharth is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 7 kpsiddharth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 12 m 57 sec
Reputation Power: 0
Unhappy searching linkedlist based on an object member rather than a whole object

hi -

i am a beginner in java. i am trying to write a web crawler in java and am faced with the following problem:

i have a class RobotProhibition comprising of 2 members:
1. a string containg the host: e.g. www.google.com
2. a linked list containing all realtive-urls that are prohibited for access by robots.

now i have defined a linked list of objects of type RobotProhibition:
LinkedList<RobotProhibition> RPList = new LinkedList<RobotProhibition>();

now i want to search the linked list for a particular host based on the value of the string field, e.g. to search for element having
host = www.google.com

however, the standard methods in the Linked List class allow me to search through objects as parameters, i.e. i have to pass the
comlpete object (string+linkedlist) to find a corresponding entry. i want to search on the basis of just the host string, that is a
member of the object.

how can i do it?

please guide.

regards.
siddhartha

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > searching linkedlist based on an object member rather than a whole object


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway