File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to change an integer search method to look for strings - any help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to change an integer search method to look for strings - any help" Watch "How to change an integer search method to look for strings - any help" New topic
Author

How to change an integer search method to look for strings - any help

celine scarlett
Ranch Hand

Joined: Nov 06, 2005
Posts: 93
Hi,

I'm writing a class, which currently includes a search method for finding integer variables within a text file. I need to change this to find strings in the same text file. I've tried changing this method, but have had no luck so far. The current code for the search method is as follows,

The constructors for this class are currently,

Any advice or help on how to change the above search method to allow me to search for strings as well as integers much appreciated.
celine scarlett
Ranch Hand

Joined: Nov 06, 2005
Posts: 93
No problem.

I've managed to sort this one out by myself. I realised that the search method had nothing to actually search, and that was why Null was being returned. I therefore created an array of TitleList type in the main class, and allowed the search method access to the details.

All works perfectly now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to change an integer search method to look for strings - any help