Searching for String literals in a ResultSet

Hi! I am currently working in a little project in which one functionallity should be the possibility to search for customers over a special dialog. This dialog consists of a JTextField and a JTable. Now when the user enters e.g. 'a' in the textfield all the customers which include an 'a' at the beginning of their name should be displayed in the JTable. When the user enters a 'b' addtionally all users which fit the condition 'ab' are shown. Currently I requery the DB every time a key is pressed. But this is not very performant over the network. Is there a way to store a buffered ResultSet in RAM and make queries on this ResultSet?
Thx

...but there must be a easier way to deal with it!Either you have all the data in the GUI or you don't. If you have it there then you have to get all of it. And then do something with it. If you don't get it all, then you are going to have to do a query each time. There is no other solution.
You could do a partial solution, for example do the first query after they type the first letter and then after that handle the data yourself.
(Keep in mind that this sort of GUI is 'really cool' but generally serves no pratical purpose particularily for large businesses. Day to day work doesn't support such usage.)

Similar Messages

  • Is it possible to search for strings containing spaces and special characters?

    In our RoboHelp project, there are figures with text labels such as Figure 1, Figure 3-2, etc.
    When I search for "Figure 3" I get all pages containing "Figure" and "3", even if I surround it in quotes.  Similarly, searching for "3-2" treats the '-' character as a space and searches for all pages containing '3' or '2'.
    Is there a way to search for strings containing spaces and special characters?

    In that case I think the answer is no if you are using the standard search engine. However I believe that Zoom Search does allow this type of searching. Check out this link for further information.
    http://www.grainge.org/pages/authoring/zoomsearch/zoomsearch.htm
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • What is the Quoting Mechanism for String Literals?

    Oracle 10G enterprise edition
    Hi all,
    I am trying to use the new feature support for string literals in 10G.but unfortunately it returns an error. Is there any settings to be done to get implemented with this feature?
    BEGIN
    DBMS_OUTPUT.put_line ('This is ram''s string!');
    DBMS_OUTPUT.put_line(q'[This is ram's string!]');
    END;
    ERROR:
    ORA-01756: quoted string not properly terminated
    Thanks
    Ram

    Art in oracle wrote:
    Oracle 10G enterprise editionAre you sure you are using 10g? (which version?)
    It works ok for me... (10.2.0.1)
    SQL> select q'[This is fred's quoted string]' from dual;
    Q'[THISISFRED'SQUOTEDSTRING]
    This is fred's quoted string
    SQL> set serveroutput on
    SQL> ed
    Wrote file afiedt.buf
      1  BEGIN
      2   DBMS_OUTPUT.put_line ('This is ram''s string!');
      3   DBMS_OUTPUT.put_line(q'[This is ram's string!]');
      4* END;
    SQL> /
    This is ram's string!
    This is ram's string!
    PL/SQL procedure successfully completed.
    SQL>

  • Searching for strings in a txt file

    I am writing a program based on the six degrees of seperation theory.
    Basically I have been given a (very large) txt file from the imdb with a list of all the films written in it.
    The text in the document is written like this:
    'Tis Autumn: The Search for Jackie Paris (2006)/Paris, Jackie/Moody, James (IV)/Bogdanovich, Peter/Vera, Billy/Ellison, Harlan/Newman, Barry/Whaley, Frank/Murphy, Mark (X)/Tosches, Nick (I)/Moss, Anne Marie
    (Desire) (2006)/Ruggieri, Elio/Micijevic, Irena
    .45 (2006)/Dorff, Stephen/Laresca, Vincent/Eddis, Tim/Bergschneider, Conrad/Campbell, Shawn (II)/Macfadyen, Angus/John, Suresh/Munch, Tony/Tyler, Aisha/Augustson, Nola/Greenhalgh, Dawn/Strange, Sarah/Jovovich, Milla/Hawtrey, Kay
    10 Items or Less (2006)/Ruiz, Hector Atreyu/Torres, Emiliano (II)/Parsons, Jim (II)/Freeman, Morgan (I)/Pallana, Kumar/Cannavale, Bobby/Nam, Leonardo/Hill, Jonah/Vega, Paz/Echols, Jennifer/Dudek, Anne/Berardi, Alexandra
    10 MPH (2006)/Weeks, Hunter/Armstrong, Pat (II)/Caldwell, Josh/Waisman, Alon/Keough, Johnathan F./Weeks, Gannon
    10 Tricks (2006)/Cruz, Raymond/Swetland, Paul/Selznick, Albie/Hennings, Sam/Gleason, Richard/Leake, Damien/Skipp, Beth/Ishibashi, Brittany/Thompson, Lea (I)/Jinaro, Jossara/Brink, Molly
    1001 Nights (2006)/Wright, Jeffrey (I)
    10th & Wolf (2006)/Lee, Tommy (VI)/Renfro, Brad/Ligato, Johnny/De Laurentiis, Igor/Luke Jr., Tony/Mihok, Dash/Garito, Ken/Capodice, John/Dennehy, Brian/Gullion, Jesse/Salvi, Francesco (I)/Cordek, Frank/Marsden, James (I)/Bernard, Aaron/Brennan, Patrick (VII)/O'Rourke, Ben/Gallo, Billy/Heaphy, James/Stragand, Dave/Vellozzi, Sonny/Pistone, Joe (I)/Morse, David (III)/Landis, Pete/Cain, Atticus/Trevelino, Dan/Demme, Larry/Sisto, Frank/Rosenbaum, Paul/Grimaldi, James (I)/Ribisi, Giovanni/Hopper, Dennis/Devon, Tony/Sigismondi, Barry/Kilmer, Val/Marinelli, Sonny/Cacia, Joseph/Rossi, Leo (II)/Tott, Jeffrey/Wawrzyniak, Aaron/Boombotze, Joey/Marie, Corina/Arvie, Michilline/Warren, Lesley Ann/De Laurentiis, Veronica/Moresco, Amanda/Boecker, Margot/Rossi, Rose/Latimore, Meritt/Dunlap, Doreen/Perabo, Piper/Horrell, Nickole/Sonnichsen, Ingrid
    11 Minutes Ago (2006)/Irving, Len/Welzbacher, Craig/Michaels, Ian/Dahl, Evan Lee/Gebert, Bob/Juuso, Jeremy/Hope, Trip/Green-Gaber, Renata/Dawn, Turiya/Reneau, Taryn/M
    Thats just 2 lines!
    what the program will do is take in a name (from a gui) of an actor/actress and find the smallest connection to a famous actor.
    So first things first, my idea of thinking is to search the file for K.E.V.I.N. B.A.C.O.N and all his films, and safe them into an array. Then do another search for films from the actor that the user entered at the gui. then find the shortest possible connection to both stars.
    my code for the search part of the program
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.File;
    import java.io.FileNotFoundException;
    public class FileSearch {
         File aFile = new File("cast.06.txt");     
         FileInputStream inFile = null;
         String actor = "surname, forename"; // the person who will be the centre point e.g. kevin.bacon.
           //get the result of the actor from the gui will go here.
         public void openFilm()
              try
                  inFile = new FileInputStream(aFile);     
              catch(FileNotFoundException e)
                   System.out.println("Error");
    }The problem I have is that I can't work out how to search the txt file for a specific string/s and save them into an array. (I'm not sure if this is the best way to go about it or not at this stage).
    So whats the best way to search for an actor from that file and save the film title and the year of release?
    Hope this makes sense? what I hope the final program will be like is like this http://oracleofbacon.org/

    I went away and looked at regular expressions and this is what I came up with
    public class NameSearch{
         public static void main(String[] args)
              NameSearch ns = new NameSearch();
              ns.runIt();
         public void runIt()
              java.util.Scanner fileScan = null;
              try{
                   fileScan = new java.util.Scanner(new java.io.File("imdb.txt"));
              }catch(java.io.FileNotFoundException e)
                   e.printStackTrace();
                   System.exit(0);
              String token = null;
              String actor = "Surname, Forename";
    //real name will go in actor, left it like that for example
              while(fileScan.hasNext()){
                   token = fileScan.next();
                   Pattern pattern = Pattern.compile(actor);
                   Matcher m = pattern.matcher(token);
                   while(m.find())
                        System.out.println(m.start() + m.end());
    }This by any means not finished, I'm just trying to get to grips with regualr expressions. But when I run the program it doesn't return anything, from what I've tried to work out is it should return actor x amount of times they appear in the file. But when I run it nothing comes back (the actors name is in the text file) so I'm not too sure what I'm doing wrong, any suggestion please

  • Searching for string in text files on XP

    Hi,
    At the moment I'm working on a Struts program. The output I get is:
    The requested resource (Invalid path /displayAddProductForum was requested) is not available.Somewhere in my files, I have a line containing /displayAddProductForum that should be displayAddProductForm. As I'm using XP as my development platform, I use the 'Windows Explorer' search facility. And I have noticed this search facility does not look in .java, .jsp and any other file with a non-Microsoft file-extension. So, how do you search for a string in a source file on XP?
    Abel

    sabre150 wrote:
    kajbj wrote:
    sabre150 wrote:
    Abel wrote:
    , I use the 'Windows Explorer' search facility. And I have noticed this search facility does not look in .java, .jsp and any other file with a non-Microsoft file-extension. So, how do you search for a string in a source file on XP? Err.. On my XP it does search though java/jsp files if I tell it to!You mean by modifying the registry?No! Using the right mouse click on a directory to get a context menu -> Search -> (All or part of filename : .java ) and (A word or phrase in the file : blah blah blah) -> Search
    Edit : Errr.. maybe I'm talking rubbish because I have just tested this and it only finds 5 java files of mine that contain the word 'class'! I'm sure it used to work because in my 'Windows' days I frequently used it.
    Edited by: sabre150 on Dec 20, 2007 12:44 PMSounds a bit odd. Search in windows should only search in registered file types and neither jsp nor java are registered types. It's however possible to modify the registry and add extensions (but it's not possible to say search within all types of files, and that sucks)

  • Search for string in PlSql-Code

    Hi
    I have a simple question. Is it possible to search for a string in all PlSql-Proceduren (Packages, Procedures, Functions, Triggers, Views). How can i find out where a certain package-prodedure/function is referenced.
    Thanks

    View -> Extended search. In 11.1 it would query against plscope dictionary views supported by rdbms. In lower versions it would reduce to querying all_source.

  • Search for string and move decimal

    Hello,
    I am trying to write code that will search for a fractional string within an array and convert it from mV to V so it can be properly compared to the other fractional string numbers in the array.
    I have an array that outputs x iterations  each with a minimum and maximum column including several different types of decimal strings (negative/positive with several decimal places) each ending with either mV and V (example string: -725.543mV).
    I then split the array into columns containing the minumum and maximum values of each iteration. I want to compare the minimum values of each iteration and find the most minimum, and do the same thing with the maximum values.
    Unfortunatley the way I'm doing it, when I convert from fractional string to number it removes the V or mV unit label but does not convert the number from mV to V. so it compares -725.543mV with -52.334V as -725.543 & -52.334 thus declaring the mV value the most minimum. I need the program to recognize that mV is less than V or search each array for values labeled with mV and move the decimal place so it is in standard V format.
    The unit label is actually part of the string and not the display (as you can see in the code I've attached) and I understand this is a little tricky with the way I have to do it. But this is a dumbed down chunk of code I will eventually incorporate into my larger program which reads the values and their units from several different types of oscilloscopes. The Scopes output the values as strings as they appear on the screen and don't differentiate between mV and V unless they are told to output the units which just tags them on the end of the string.
    I'm sorry for the large post. SO to sum up I need to search an array to make sure all values have the same units, if they don't I need to convert each value to the proper unit and output the max and min from the resulting array. my code is attached. Thank you for your help.
    Solved!
    Go to Solution.
    Attachments:
    File manipulation.vi ‏15 KB

    crossrulz wrote:
    jcarmody wrote:
    camerond wrote:
    Sorry, Jim, that's not quite right. You forgot to consider significant figures (your third min is not quite right). [...]
    Good catch, but, really?   
    That "Finally!" comes out to -5569492V to me.  Holy crap.  -5.569492MV!  I think there's a problem there.
    Carp! Stupid negative numbers, shouldn't be allowed. Put a piece of duck tape over the place for that negative sign, that'll fix it.
    I'll get back, it's now a matter of principle.
    Jim, how does your algorithm do when there are 8 or 9 sig figs, say -56.9492345mV? (Yep, too lazy to draw it in myself.)
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Search for string in paragraph and apply a new character style?

    I'm searching for a way to find a specific string in a specific text frame and make it bold. so my thought was to search and then apply a character style from my template doc. I thought this would work, but I went wrong somewhere.
    newDoc is my document. 
    //something like
    var Bios = "Representative Biography:\r want to leave this text normal.";
    var myTextFrameBios = newDoc.pages.item(i).textFrames.add({geometricBounds:[4.5277, 2.36, 8.625, 5.375], contents:Bios});
    var myTextObjectBios = myTextFrameBios.parentStory.texts.item(0);
    // IS THIS CONFLICTING with my change below? Can I apply a character style within a par styled frame?
    myTextObjectBios.appliedParagraphStyle = newDoc.paragraphStyles.item("CompanyProfile");
                                                      //Clear the find/change preferences.
                                                    app.findGrepPreferences = NothingEnum.nothing;
                                                    app.changeGrepPreferences = NothingEnum.nothing;
                                                    app.findTextPreferences.findWhat = "Representative Biography:";
                                                    app.changeTextPreferences.changeTo = "Representative Biography:";
                                                    app.findGrepPreferences.appliedCharacterStyle = newDoc.characterStyles.item("BoldBioHead");
                                                    // Perform the operation
                                                    app.documents.item(0).changeGrep();
                                                    app.findGrepPreferences = NothingEnum.nothing;
                                                    app.changeGrepPreferences = NothingEnum.nothing;

    @caseyctg – If you want to apply a character style to a text object in a specific text frame, you could restrict the scope of your script to that specific text frame:
    Example with the variable "myTextFrame" you have to define before:
    myTextFrame.changeText();
    Btw.: you are doing a text search and clearing your GREP find/change preferences at the start of the snippet? Why is that?
    You could do a:
    app.changeTextPreferences = app.findTextPreferences = NothingEnum.nothing;
    or:
    app.changeTextPreferences = app.findTextPreferences = null;
    set before the search and after the change, if you want to be on the safe side…
    Uwe

  • Search for strings inside html tags ?

    Is there any way to get Spotlight to find search strings inside html documents? One example is I want to find any file that includes a certain alt=" " string inside an img src tag.
    Spotlight does not seem to include anything inside html tags in it's search, as far as I can tell.
    Am I missing something? Is there something I need to do?
    Thanks for any ideas,
    KarenD
    G5   Mac OS X (10.4.4)  
    G5   Mac OS X (10.3.5)  

    Very strange--it does find text inside the html files, but indeed does not seem to have text that is in the file but only appears within a tag. The solution is EasyFind by Christian Grunenberg:
    http://www.grunenberg.com
    You can do a content search on files in a particular folder, which I recommend since it does a brute force search and can take awhile if it has to search everything.
    Francine
    Schwieder

  • Searching for String in Vector

    I know I posted just a few minutes ago about sorting, but I'm making a program (not related to homework at all, this is all for my parents business) and my program needs to store names and fetch them. We have thousands of people in our contacts so it's only logical that I would provide searching so that my mom could easily find a contact she is looking for.
    The contacts are stored in a vector, first name, last name, address, etc. I want to provide a search function that can search the names, or addresss, or both. Then, when a match is found, it returns the results to a JList or something.
    Search Text: "St. Marie"
    Results:
    1. St. Marie, Josh
    2. St. Marie, Someone
    etc etc...

    My program uses files, it uses the files to populate the vector. I'm using a vector, not an array or anything else to access the data in the files. heres a sample of the save method in my program.private void saveContacts ()
          FileOutputStream fos = null;
          try
              fos = new FileOutputStream ("contacts.dat");
              DataOutputStream dos = new DataOutputStream (fos);
              dos.writeInt (contacts.size ());
              for (int i = 0; i < contacts.size (); i++)
                   Contact temp = (Contact) contacts.elementAt (i);
                   dos.writeUTF (temp.fname);
                   dos.writeUTF (temp.lname);
                   dos.writeUTF (temp.phone);
                   dos.writeUTF (temp.fax);
                   dos.writeUTF (temp.email);
          catch (IOException e)
             MsgBox mb = new MsgBox (this, "CM Error",
                                     e.toString ());
             mb.dispose ();
          finally
             if (fos != null)
                 try
                     fos.close ();
                 catch (IOException e) {}
       }The variable "contacts" is my vector.

  • Search for string and replace with frame break

    Hello there,
    We're using an InDesign CS6 Server for creating print data. The problem relates to our documents that consist of several connected text frames.
    Situation:
    The texts are exported from our database into InDesign via xml and so some automated editing in javascript. These texts contaion several paragraphs with headlines. Sometimes after the import the layout just looks bad, because the first textfield contains the fist paragraph and the headline of the second paragraph including some lines of text. Sometimes this behaviour is desired and sometimes not.
    Workaroud:
    We definde the string #*# to be our placeholder for line breaks. During the creation of the xml this string gets replaced by unicode for the hard line break (&#xA;).
    Desired Solution:
    This workaround has some disadvantages and we want our placeholder string to be translated to a frame break.
    Until now I have neither found any definition for the unicode translation of the frame break nor a script based solution that just replaces this string with a frame break. any help is appreciated.
    Regards

    Instend of define string add attribute in xml or DB
    e.g attribute name frame break="frame break"
    after that through find the attribute get the insertion ponint and apply "SpecialCharacters.FRAME_BREAK"

  • Search for String patterns in a Database table

    Hi
    There is a select statement using where condition with a like statement
    WHERE table1  <> 'JP'
                 AND (
                     ( field1 LIKE '%:%' OR field2 LIKE '%:%' )
          It fetches records where the field field1 or field2 has string:string as value where string is some set
    of   characters . What is  the equivalent of LIKE in se11 / se12 .
    Thanks in advance .
    Geethanjali

    Hello
    Try

  • Searching a String in Script

    Hi All,
    I need one help is there any provision to search for string in standard or customized scripts....for example to search a string in programs..through program RPR_ABAP_SOURCE_SCAN i can search in program...same way how can i search for a text in scripts ??
    Regards
    VEnk@

    Continue....
    FORMAT COLOR COL_NORMAL INTENSIFIED ON.
      STXL_ID-TDOBJECT = 'FORM'.
      STXL_ID-TDID = 'TXT'.
      SELECT * FROM STXL CLIENT SPECIFIED
              WHERE MANDT    = PA_MANDT
                AND RELID    EQ 'TX'
                AND TDOBJECT EQ 'FORM'
                AND TDID     EQ 'TXT'
                AND TDNAME   IN SO_NAME
                AND TDSPRAS  IN SO_SPRAS.
        MOVE-CORRESPONDING STXL TO I_STXL.
        APPEND I_STXL.
      ENDSELECT.
      SORT I_STXL.
      CLEAR HUIDIGE_TDSPRAS_TDNAME.
      CLEAR VORIGE_TDSPRAS_TDNAME.
      LOOP AT I_STXL.
        STXL_ID-TDNAME  = I_STXL-TDNAME.
        STXL_ID-TDSPRAS = I_STXL-TDSPRAS.
        STXL_ID-TDID    = I_STXL-TDID.
        CONCATENATE STXL_ID-TDSPRAS STXL_ID-TDNAME
                    INTO HUIDIGE_TDSPRAS_TDNAME.
        IF HUIDIGE_TDSPRAS_TDNAME <> VORIGE_TDSPRAS_TDNAME.
          CONCATENATE STXL_ID-TDSPRAS STXL_ID-TDNAME
                                      INTO VORIGE_TDSPRAS_TDNAME.
          REFRESH LINES.
          CLEAR H_TEL.
          IMPORT TLINE TO LINES FROM DATABASE STXL(TX)
                                     CLIENT   I_STXL-MANDT
                                     ID       STXL_ID.
          LOOP AT LINES.
            IF LINES-TDFORMAT = '/W'.
              H_WINDOW = LINES-TDLINE.
            ENDIF.
            SEARCH LINES-TDLINE FOR H_STRING1.
            IF SY-SUBRC <> 0 AND H_STRING2 <> SPACE.
              SEARCH LINES-TDLINE FOR H_STRING2.
            ENDIF.
            IF SY-SUBRC EQ 0 AND LINES-TDFORMAT NE '/*'.
              H_POS = SY-FDPOS.
              IF NOT PA_ITEM1 IS INITIAL.
                ADD 8 TO H_POS.
              ENDIF.
              IF NOT PA_ITEM4 IS INITIAL.
                ADD 11 TO H_POS.
              ENDIF.
              H_LEN = STRLEN( PA_STR ).
              H_STRING = LINES-TDLINE+H_POS(H_LEN).
              IF H_TEL EQ 0.
                HIDE I_STXL-MANDT.
                HIDE STXL-TDNAME.
                HIDE I_STXL-TDSPRAS.
                WRITE: /001 I_STXL-MANDT,
                        005 STXL-TDNAME HOTSPOT ON,
                        036 I_STXL-TDSPRAS,
                        041 H_WINDOW(30).

  • How can I search for an exact string match in my emails?

    I was looking for an old email that I had about Re-Animator The Musical. So, in the search bar in the upper right corner of the Thunderbird window, I typed "re-animator". I got 59 hits, and the message that actually contained the string "re-animator" was 27th, when sorted by relevance. All of the other hits were emails which contained the word "animal" or "animals", which to me has nothing to do with "re-animator". I'm surprised that those were considered hits at all, much less that they were considered more relevant than the one message which actually contained the desired string.
    I actually tried three different searches:
    reanimator
    re-animator
    "re-animator"
    (i. e. the first two were without quotes and the third was with quotes). All three of these variations had the same problem, though, that messages containing "animal" were ranked before the message containing "re-animator".
    The desired message contained the word "Re-Animator" (with that capitalization and hyphenation), and also contained "reanimatorthemusical" as part of a URL that was mentioned in the message. So, I would have expected both the search with the hyphen and the search without the hyphen to have been good hits for this message.
    My question is: How can I tell Thunderbird to search for messages that literally contain the string I ask for, and not get "creative" with the matches, as it seems to be doing for some reason?
    (I'm using Thunderbird 31.3.0 on Mac OS X 10.9.5.)

    No, searching for:
    "Animator" musical
    still has the exact same problem: it still wants to find "animal" instead of "animator". Why?
    Yes, I had already read the support article you linked to, but I hadn't found anything in it about why Thunderbird would prefer "animal" over "animator", or how to disable this misfeature. Is there no better documentation for the search bar than that?
    (And the search for "Animator The Musical" didn't find my message, simply because my message didn't contain that exact string. It contained "I am on a waiting list for some musical tickets for Sunday, but I haven't heard back yet. It is a preview of The Re-Animator. ( http://www.reanimatorthemusical.com/ )." The search for "Animator The Musical" only had a single hit, your message in which you suggest searching for that.)

  • Help to search for a string value and return the index in the arraylist

    Hello,
    I just start java programming for the last three weeks and I cannot find a solution for this problem. I have the following List with string and integer value as shown below:
    List<Empl> list= new ArrayList<Empl>();
         list.add(new Empl(1,"Jim", "Balu",88);
         list.add(new Empl(3,"Bob", "Howards",2);
         list.add(new Empl(2,"Chris", "Hup",8);
    I have no problem of sorting this arraylist either by firstname or lastname. However, I cannot think of a way to search for a firstname or lastname and returing the whole row. I do not want to use index since I am asking user to enter the name to search. Here is my code to search for an empl based on index.
    System.out.print("Please enter index to search or (q)uit: ");
              String ans = sc.next();
              System.out.println();
              int ians = Integer(ans);
              if (ans.equalsIgnoreCase("q"))
                        choice = "n";
              else
              System.out.println("index " + list.get(ians)); //this will print out the whole row based on the index
    Since the user will never seen the contents of the arraylist, is there a way that I can search by string last/first name and will get the index location in int if the result is met?
    Please advice and thank you.
    Bob.

    user11191663 wrote:
    Since the user will never seen the contents of the arraylist, is there a way that I can search by string last/first name and will get the index location in int if the result is met?Another possibility is to set up an ArrayList for each thing you want to search on and then every time you add an employee, add the piece of data you want as well, viz:
    Empl e = new Empl(1,"Jim", "Balu",88);
    list.add(e);
    firstNames.add(e.firstName());As long as you always add them in the same order, the indexes will match, so you could do something like
    ians = firstNames.indexOf(nameToFind);to return the index of the name, if it's there (if not, it will return -1).
    I wouldn't recommend this as standard practise, but it should be OK for the level you're at.
    NOTE: indexOf() returns the index of the FIRST matching item. You may want to think about what you want to do if there are more than 1.
    Winston

Maybe you are looking for

  • How to reset sync status of iDevice without wiping it?

    Ok, iTunes 11.1 syncing seems to be a lot better than it used to be, it no longer seems to want to wipe your iDevice every time you click on a setting ("enabling sync for music will erase all apps on your device, are you sure you want to do that?  "N

  • How do I get rid of this message

    How do I get rid of this message on start up (after up grading to leopard, Powerbook G4)? The application "HotSync Manager" could not be launched because of a shared library error: "<HotSync Manager><HotSync Manager><HotSyncLib.PPC>" Not sure how to

  • Itunes installing problem, xp.

    Hey ppl. i have problem installing Itunes on my pc, everytime i try to install it stops when i reachen a piont called "Status: Stopping services" what services is it trying to stop and why is my pc freezing. i have windows xp installed.

  • Field Tax Number 1 in VA01

    Hi I am using the BAPI sd_salesdocument_create to create sales orders and need to pass the field Tax Number 1 (STCD1) for the case of a customer CPD. I'm using the table EXTENSIONIN as follows but not recorded the field. EXTENSIONIN-STRUCTURE = 'VBPA

  • Error in consuming BusinessPartnerCRMElementsByElementsQueryResponse_In

    Hi, I am consuming the standard enterprise service "Find Business Partner Elements by Elements" with technical name "BusinessPartnerCRMElementsByElementsQueryResponse_In" in Webdynpro CE 7.1 .the service provider is CRM 7.0. The response from the ent