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