Can Vector contain ResultSet which is a Interface

What i am trying is to execute 3 different SQL in a Bean and try it to transfer in a JSP.I am using Vector for this work.I am putting the ResultSet in the Vector and transfer that Vector to the Jsp,In which i am displaying the Result.
I wanted to know that Is it possible to do the thing in this way.Or some other way is there.
Could any one tell me the Solution.

May be I 'm wrong, but the objets implementing the ResultSet interface
must be serializable and have a public default constructor if you want
to serialize/deserialize them. I don't think the most know drivers
are offering you these features.
Even if it's feasible, I don't think serializing a whole data set is
really a good idea, because of the big overhead of doing this.
You'd better convert the resultSet into smaller objects and
only pass a set of them to your jsp only under request,
not the whole thing once.
Hope this helps

Similar Messages

  • Can anyone tell me which jar contain weblogic.jws.WLJmsTransport class

    Hi All,
    Can anyone tell me which jar contain weblogic.jws.WLJmsTransport class
    Thanks in advance?

    Hi,
    You can find that in the "*weblogic.jar*", "*wls-api.jar*" and "*wseeclient.jar*" which can be found in the below directory
    Path:
    wlserver_10.3/server/lib/
    Also you can have a look at the below link which shows you how to find any CLASS present inside your file system.
    Topic: Finding Classes using JAR SCANNER
    http://middlewaremagic.com/weblogic/?page_id=241#comment-3621
    Regards,
    Ravish Mody

  • Vectors: contains() inconsistency with Object equals()

    Hi,
    I have a problem with using Vector contains() on my own classes.
    I have a class TermDetails, on which I have overloaded the equals() method:
         public boolean equals(Object other) {
              try {
                   TermDetails otherTerm = (TermDetails) other;
                   return (term.equals(otherTerm.term));
              catch (Exception e) {
                   try {
                        String otherTermString = (String) other;
                        return (term.equals(otherTermString));
                   catch (Exception f) {
                        System.out.println("Can't convert Object to TermDetails or String");
                        System.out.println(f.getMessage());
                        return(false);
         public boolean equals(String otherTermString) {
              return(term.equals(otherTermString));
    The Vector.contains() should then use one of these equals methods to return correctly, but doesn't use either of them... any ideas why not?
    (I've tried adding some console output in the equals methods, just to prove if they get called or not. They don't.)
    Thanks in advance!
    Ed

    This won't work. It only tests whether the two objects are of the same class. In general, you need to test a number of things:
    1) if obj == this, return true
    2) if obj == null, return false
    3) if obj.getClass() != this.getClass() return false
    (Note: You don't need getClass().getName(). Also, there are times when the classes don't have to match, but it's sufficient that obj and this implement a particular interface--Map for instance).
    4) if all relevant corresponding fields of obj and this are equal, return true, else false.
    That's just a high level run-down, and you should definitely look at the book that schapel mentioned.
    Also, this probably won't affect Vector.contains, but make sure that when you override equals, you also override hashCode. The rule is that if a.equals(b) returns true, then a.hashCode() must return the same value as b.hashCode(). Basically any field that is used in computing hashCode must also be used in equals.
    Note that the converse is not true. That is two objects with the same hashCode don't have to be equal.
    For instance, if you've got a class that represents contact info, the hashCode could use only the phoneNumber field. hashCode will then be fast to compute, will probably have a good distribution (some distinct people's contact info could have the same phone number, but there won't be a large overlap), and then you use phone number plus the rest of the fields (address, etc.) for equals.
    Here's an example that shows that equals will work if
    written correctly
    import java.util.Vector;
    public class testEquals {
    public static void main(String args[]) {
    Vector testVector = new Vector();
    testVector.add(new A());
    testVector.add(new B());
    System.out.println("A == A? " +
    + testVector.contains(new A()));
    System.out.println("B == B? " +
    + testVector.contains(new B()));
    class A {
    public boolean equals(Object object) {
    if (getClass().getName() ==
    = object.getClass().getName()) {
    System.out.println("A == A");
    return true;
    } else {
    return false;
    class B {
    public boolean equals(Object object) {
    if (getClass().getName() ==
    = object.getClass().getName()) {
    System.out.println("B == B");
    return true;
    } else {
    return false;

  • How can I import songs which are filed basis one album/compilation as one folder?

    How can I import songs which are filed basis one album/compilation as one folder?
    i can drag and drop one folder which is a proper album into itunes under playlist. if i drag and drop two proper albums into itunes it is also ok but if itunes does not know my own compliations and i drag and rop my 3000 folders in one shot into itunes i get only one playlist containing all songs.
    pleased to hear if anybody know how i can avoid to do 3000 times drag and drop a folder into itunes.
    rgds, alexander

    Before you begin the import, edit the properties of the tracks to set the Album Artist to Various Artists and Part of a Compilation to Yes.
    For more info. see Grouping tracks into albums.
    tt2

  • Hello can anybody  help me to build an interface

    hello can you help me to build an interface that can work with this english to private talk converter code
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.FileReader;
    public class Translate
    public static void main(String [] args) throws IOException
    if (args.length != 2)
    System.err.println("usage: Translate wordmapfile textfile");
    System.exit(1);
    try
    HashMap words = ReadHashMapFromFile(args[0]);
    System.out.println(ProcessFile(words, args[1]));
    catch (Exception e)
    e.printStackTrace();
    // static helper methods
    * Reads a file into a HashMap. The file should contain lines of the format
    * "key\tvalue\n"
    * @returns a hashmap of the given file
    @SuppressWarnings("unchecked")
    private static HashMap ReadHashMapFromFile(String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    HashMap map = null;
    try
    in = new BufferedReader(new FileReader(filename));
    String line;
    map = new HashMap();
    while ((line = in.readLine()) != null)
    String[] fields = line.split("\\t", 2);
    if (fields.length != 2) continue; //just ignore "invalid" lines
    map.put(fields[0], fields[1]);
    finally
    if(in!=null) in.close(); //may throw IOException
    return(map); //returning a reference to local variable is safe in java (unlike C/C++)
    * Process the given file
    * @returns String contains the whole file.
    private static String ProcessFile(Map words, String filename) throws FileNotFoundException, IOException
    BufferedReader in = null;
    StringBuffer out = null;
    try
    in = new BufferedReader(new FileReader(filename));
    out = new StringBuffer();
    String line = null;
    while( (line=in.readLine()) != null )
    out.append(SearchAndReplaceWordsInText(words, line)+"\n");
    finally
    if(in!=null) in.close(); //may throw IOException
    return out.toString();
    * Replaces all occurrences in text of each key in words with it's value.
    * @returns String
    private static String SearchAndReplaceWordsInText(Map words, String text)
    Iterator it = words.keySet().iterator();
    while( it.hasNext() )
    String key = (String)it.next();
    text = text.replaceAll("\\b"+key+"\\b", (String)words.get(key));
    return text;
    * @returns: s with the first letter capitalized
    String capitalize(String s)
    return s.substring(0,0).toUpperCase() + s.substring(1);
    ... here's the head of my pirate_words_map.txt
    hello     ahoy
    hi     yo-ho-ho
    pardon me     avast
    excuse me     arrr
    yes     aye
    my     me
    friend     me bucko
    sir     matey
    madam     proud beauty
    miss     comely wench
    stranger     scurvy dog
    officer     foul blaggart
    where     whar
    is     be
    are     be
    am     be
    the     th'
    you     ye
    your     yer
    tell     be tellin'

    hakimade wrote:
    hello can you help me to build an interface that can work with this english to private talk converter codeYou might want to re-ask this question in such a way that it can be answered.
    Also, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag [code] at the top of your block of code and the tag [/code] at the bottom, like so:
    [code]
      // your code block goes here.
      // note the differences between the tag at the top vs the bottom.
    [/code]or
    {code}
      // your code block goes here.
      // note here that the tags are the same.
    {code}Good luck.

  • My ASA5540 8.2.4(4) can not monitor and failover on certain interfaces

    the story is
    we configure the
    monitor interface  inside
    monitor interface  outside
    monitor interface  partner
    and save configue
    but when i show run monitor-interface
    the configure do not show the 3 montitor interfaces, it only show other monitor interfaces,which can failover , but not the above 3 interfaces,  however they are all showed  interface monitor in the ASDM configure
    here is the show version
    ==================================
    Cisco Adaptive Security Appliance Software Version 8.2(4)4
    Device Manager Version 6.4(5)
    Compiled on Thu 03-Mar-11 17:18 by builders
    System image file is "disk0:/asa824-4-k8.bin"
    Config file at boot was "startup-config"
    dcm-lidc-fw1 up 9 days 18 hours
    failover cluster up 16 days 20 hours
    Hardware:   ASA5540, 2048 MB RAM, CPU Pentium 4 2000 MHz
    Internal ATA Compact Flash, 256MB
    BIOS Flash Firmware Hub @ 0xffe00000, 1024KB
    Encryption hardware device : Cisco ASA-55x0 on-board accelerator (revision 0x0)
                                 Boot microcode   : CN1000-MC-BOOT-2.00
                                 SSL/IKE microcode: CNLite-MC-SSLm-PLUS-2.03
                                 IPSec microcode  : CNlite-MC-IPSECm-MAIN-2.05
    0: Ext: GigabitEthernet0/0  : address is 30e4.db7b.6f82, irq 9
    1: Ext: GigabitEthernet0/1  : address is 30e4.db7b.6f83, irq 9
    2: Ext: GigabitEthernet0/2  : address is 30e4.db7b.6f84, irq 9
    3: Ext: GigabitEthernet0/3  : address is 30e4.db7b.6f85, irq 9
    4: Ext: Management0/0       : address is 30e4.db7b.6f86, irq 11
    5: Int: Internal-Data0/0    : address is 0000.0001.0002, irq 11
    6: Int: Not used            : irq 5
    7: Ext: GigabitEthernet1/0  : address is 30e4.db02.1f96, irq 255
    8: Ext: GigabitEthernet1/1  : address is 30e4.db02.1f97, irq 255
    9: Ext: GigabitEthernet1/2  : address is 30e4.db02.1f98, irq 255
    10: Ext: GigabitEthernet1/3  : address is 30e4.db02.1f99, irq 255
    11: Int: Internal-Data1/0    : address is 0000.0003.0002, irq 255
    Licensed features for this platform:
    Maximum Physical Interfaces    : Unlimited
    Maximum VLANs                  : 200      
    Inside Hosts                   : Unlimited
    Failover                       : Active/Active
    VPN-DES                        : Enabled  
    VPN-3DES-AES                   : Enabled  
    Security Contexts              : 2        
    GTP/GPRS                       : Disabled 
    SSL VPN Peers                  : 2        
    Total VPN Peers                : 5000     
    Shared License                 : Disabled
    AnyConnect for Mobile          : Disabled 
    AnyConnect for Cisco VPN Phone : Disabled 
    AnyConnect Essentials          : Enabled  
    Advanced Endpoint Assessment   : Disabled 
    UC Phone Proxy Sessions        : 2        
    Total UC Proxy Sessions        : 2        
    Botnet Traffic Filter          : Disabled 
    This platform has an ASA 5540 VPN Premium license.
    ==========here is the show monitor interface, it does not show outside/inside/partner====================
    -fw1# sh run monitor-interface
    monitor-interface app
    monitor-interface dmz
    monitor-interface data
    monitor-interface dev-app
    monitor-interface dev-data
    no monitor-interface management
    -fw1#
    -fw1(config)# sh run all | in monitor
    banner motd *  This is a private and monitored system.      *
    monitor-interface app
    monitor-interface dmz
    monitor-interface data
    monitor-interface dev-app
    monitor-interface dev-data
    no monitor-interface management
    ===============failover test =============
    - unplug the outside interface cable on primary , led go off, but failover does not happen-
    - upplug the cable on inside, or parner , it still do not failover
    - only unplug the cable on other monitor interface , it failover. 
    =======clear config monitor-interface, and enter monitor-interface command for all the interface, re test, again, same result=======

    fw1# sh failover
    Failover On
    Failover unit Secondary
    Failover LAN Interface: failover GigabitEthernet1/3 (up)
    Unit Poll frequency 1 seconds, holdtime 15 seconds
    Interface Poll frequency 5 seconds, holdtime 25 seconds
    Interface Policy 1
    Monitored Interfaces 8 of 210 maximum
    Version: Ours 8.2(4)4, Mate 8.2(4)4
    Last Failover at: 15:44:00 EST Nov 24 2011
            This host: Secondary - Standby Ready
                    Active time: 767625 (sec)
                    slot 0: ASA5540 hw/sw rev (2.0/8.2(4)4) status (Up Sys)
                      Interface outside (209.202.65.132): Normal
                      Interface inside (10.100.161.2): Normal
                      Interface app (10.100.171.2): Normal
                      Interface dmz (10.100.172.2): Normal
                      Interface data (10.100.173.2): Normal
                      Interface dev-app (10.100.174.2): Normal
                      Interface dev-data (10.100.175.2): Normal
                      Interface management (10.7.4.9): Failed (Not-Monitored)
                      Interface partner (10.100.160.14): Normal
                    slot 1: ASA-SSM-4GE hw/sw rev (1.0/1.0(0)10) status (Up)
            Other host: Primary - Active
                    Active time: 77823 (sec)
                    slot 0: ASA5540 hw/sw rev (2.0/8.2(4)4) status (Up Sys)
                      Interface outside (209.202.65.131): Normal
                      Interface inside (10.100.161.1): Normal
                      Interface app (10.100.171.1): Normal
                      Interface dmz (10.100.172.1): Normal
                      Interface data (10.100.173.1): Normal
                      Interface dev-app (10.100.174.1): Normal
                      Interface dev-data (10.100.175.1): Normal
                      Interface management (10.7.4.8): Normal (Not-Monitored)
                      Interface partner (10.100.160.13): Normal
                    slot 1: ASA-SSM-4GE hw/sw rev (1.0/1.0(0)10) status (Up)
    Stateful Failover Logical Update Statistics
            Link : failover GigabitEthernet1/3 (up)
            Stateful Obj    xmit       xerr       rcv        rerr     
            General         1001073    0          443701     25       
            sys cmd         194284     0          194283     0        
            up time         0          0          0          0        
            RPC services    0          0          0          0        
            TCP conn        262196     0          45389      2        
            UDP conn        342196     0          47480      3        
            ARP tbl         202397     0          156529     20       
            Xlate_Timeout   0          0          0          0        
            IPv6 ND tbl     0          0          0          0        
            VPN IKE upd     0          0          10         0        

  • Bundles can't contain multiple app packages error

    Hi All,
    I am building an universal windows application targeting to multiple platforms x86,x64 and ARM.
    However when i build my project in TFS i get following exception
    "D:\Builds\22\MDWindowsClient\MDWindowsClient_dev\src\MDWindowsClient\MDWindowsClient.Windows\MDWindowsClient.Windows.csproj" (default target) (2) ->
    (_CreateBundle target) ->
    MakeAppx : error : Error info: error 80080204: The package with file name "MDWindowsClient.Windows_1.0.0.9_x86_Debug.appx" and package full name "SMDWindowsClient_1.0.0.9_x64__8cggqpkfn886j" is not valid in the bundle because the bundle also contains the package with file name "SMDWindowsClient.Windows_1.0.0.9_x64_Debug.appx" and package full name "SMDWindowsClient_1.0.0.9_x64__8cggqpkfn886j" which applies to the same processor architecture. Bundles can't contain multiple app packages for the same processor architecture, or an architecture-neutral app package with any architecture-specific app package. [D:\Builds\22\SMDWindowsClient\SMDWindowsClient_dev\src\SMDWindowsClient\SMDWindowsClient.Windows\SMDWindowsClient.Windows.csproj]
    MakeAppx : error : Bundle creation failed. [D:\Builds\22\MDWindowsClient\MDWindowsClient_dev\src\MDWindowsClient\MDWindowsClient.Windows\MDWindowsClient.Windows.csproj]
    MakeAppx : error : 0x80080204 - The specified package format is not valid: The package manifest is not valid. [D:\Builds\22\MDWindowsClient\MDWindowsClient_dev\src\MDWindowsClient\MDWindowsClient.Windows\MDWindowsClient.Windows.csproj]
    Already this kind of error was reported here https://social.msdn.microsoft.com/Forums/vstudio/en-US/ce255209-a94b-41c1-97f6-4659f5844ce3/how-to-create-a-windows-store-bundle-by-tfs-2013-build-system?forum=tfsbuildBut found no solution to this problem
    Any help will be hugely appreciated.
    Best Regards,
    Saurav

    Hi Saurav,  
    Thanks for your post.
    Your application is Windows Store application? And you can manually build(using MSBuild) your application on build agent machine successfully?
    As this is a reproduced issue and posted to feedback site, but there’s no a solution in that old feedback and it be closed, so please resubmit this issue to Microsoft Connect Feedback portal at:
    https://connect.microsoft.com/VisualStudio Microsoft engineers will evaluate them seriously. 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Trying to integrate with User Messaging Service adapter in SOA suite.Can it be possible through an JMS interface.

    Trying to integrate with User Messaging Service adapter in SOA suite. Can it be possible through an JMS interface.
    I have an JMS backend integrated to Oracle B2B. Is it possible to send an email protocol message using JMS interface to B2B where User messaging Service has been implemented. The adapters required for UMS have been deployed and the sdpmessaging jar files also have been added to the classpath. The only problem i face is i dont have an BPEL system to integrate where as in the forums it has been mentioned how to post a message using BPEL.
    Please let me know if there is a way to integrate the adapter with JMS interface.
    Thanks in advance
    Deepak

    If I remember correct, to use JCA adapter with SOA stack requires that adapter implement some Oracle API.
    The Adapter SDK is a light-weight tool kit that enables rapid implementation and deployment --- http://www.oracle.com/technology/products/integration/adapters/pdf/DS_OracleASAdapter.pdf
    http://download.oracle.com/docs/cd/B16981_04/current/acrobat/cct115dg.pdf
    Mostly you will have to wrap your jca adapter to make it available in SOA suite/stack.
    Other option is that you adapter provider would have given CCI interface or some custom interface which can be used for invoking adapter end-points.
    Manoj

  • Can C++ Container Determine AS2 vs AS3

    I have a C++ container of Flash Player 11 (I have also tried
    Player 9 and Player 10). How can the container ask the player what
    type of content it is playing (AS2 or AS3)?
    If I create an event handler (ExternalInterface.addCallback)
    in AS3 which returns true (depicting AS3), and call
    m_FlashPlayer.CallFunction in my container, I am able to
    receive/parse the ActionScript response ("<true/>").
    However, if the content is "old" (i.e. AS2 which does not
    have the necessary event handler) ... or if the content is AS3 and
    I deliberately throw an exception (throw new Error("AS3 Error") in
    my event handler) ... the C++ container has no way of
    differentiating between AS2 or AS3. My container catches the
    COleDispatchException, but there is no information within the
    exception. Both scenarios result with an m_scError = 0x80004005
    (E_FAIL).
    Is there a prescribed way for a container to ask the
    Shockwave player if it is playing AS2 or AS3 content?

    You are confusing the Shockwave Player (which runs
    Director-created
    content) with the Flash Player

  • Can vector CANoe software can be used to integrate with NI XNET?

    Can vector CANoe software can be used to integrate with NI XNET hardware?, Is there drivers available for NI XNET PXI card to communicate and talk to Vector CANoe software?. Please help. This would help us reduce creating the Database using LAbVIEW.
    _Ventakesswaran

    CANoe is essentially made to integrate Vector hardware, so you can't directly use NI-XNET interfaces into your CANoe system. There are still a few ways to communication between LabVIEW (or CVI) and CANoe if you need to share data. It includes :
    - Using the ActiveX server of CANoe in LabVIEW. It allows LabVIEW to automate most tasks in CANoe and notably write/read data.
    - Writing a server/client code based on TCP or UDP to send and receive data. In LabVIEW, it just uses the primitives in the Data Communication palette. In CANoe, the communication can be handled by some code written in a CAPL node.
    The first way is slower, but does not require to write code in CANoe. There are also a few examples going around the web :
    - https://decibel.ni.com/content/docs/DOC-16844
    Regards
    --Eric
    Eric M. - Application Engineering Specialist
    Certified LabVIEW Architect
    Certified LabWindows™/CVI Developer

  • Which Logic Pro interfaces will it be with no compromising?

    Hello
    I wanted a round about to which Logic Pro interfaces people think could be the most practical and best sounding with no compromising?
    Digi feels like compromising for pro tools sessions, which is fine if you work for the man or have one, but my question is whats the best interface or and mixer i/o in terms of sound and practicallity with Logic not Pro Tools.
    So far i only found suggestions hinting to smaller i/os like the firebox or Ensemble which have leeps in prices for example.
    Anyone have insight to share?

    There are a few ways at this point. If you want an all in one RME is a good choice with a good balance of sound, I/O and stability. MH does offer their interfaces with and without DSP. You can use aggregation get any combo you like. If you're more interested in recording 2 tracks at once ULN-2 and another interface for your less frequent I/O. I don't recall you specifying your budget and needs so I can only throw out so many suggestions, some may hit the mark. What Sample Rates do you want to record to what devices (Digital Mixer?) do you need to connect? AFAIK nobody can comment on the ensemble at this point. At this point RME and MH seem like your contenders. If you want quality and affordability you'll have to make sacrifices somewhere. Maybe a 2882 and the option to get a decent pre if you dislike the pres built in.
    Mark wasn't disagreeing with me and makes a good point, the 2882 pres are usable. I have used them many times. For the features on the 2882 it's a steal (IMO) but the conversion is where the quality lies. Can you find a great 8 ch pre for $1200?-not easily (price comparison refers to 2882 non-DSP). For me, the quality is focused more on the conversion, you'll have the option to buy a pre if you don't find them sufficient. Concerning the pres, many pro recordings are done with them but often they use mics with hotter outs. They are not bad, I think it's a great box, for high quality recordings with ANY mic-you'll want to know a pre is a good idea. ULNs can also remember their boot states so if you want to use it as a master clock and your primary AD/DA then use another interface for the additional outs that's another option.
    So I suppose some narrowing down and specifics are need at this point if you can't decide.

  • Which Event Listener interface is used to handle the events

    Hi!
    which Event Listener interface is used to handle events that occur when an attribute is added or removed from the Application Servlet context?
    1.Servlet context Listener
    2.HTTP Session Activation Listener
    3.HTTP Session Listener
    4.Servlet Context Attribute Listener
    Thanx

    I guess you can find that out using google.... it would be fast and easy...

  • Cannot submit app update - "Error The submission can only contain one appx or one appxbundle."

    I'm trying to submit my app update to the store and I get the following error:
    Error
    The submission can only contain one appx or one appxbundle.
    So I thought I should maybe utilize the "Delete" option to allow me to submit an updated appx or appxbundle (since these are the only file types that App Studio allows us to build). However, when I do, I get the
    following message:
    Can't delete this package
    You must have at least one 8.1 package in your submission.
    ... So I'm basically stuck. Can't delete to upload a new one. Can't upload a new one because there's one already there. It would be nice if you could automatically sunset the old appx/appxbundle package in favor of the new
    one.
    Update: Solved! Solution below.

    Since this is still an issue, shouldn't it be escalated for a fix so that the page works on any modern browser?
    I see two independent problems here:
    - Hitting Delete should work, not bash the user with a "You must have at least one 8.1 package in your submission." message (i.e. allow the developer to delete and then add a new file, if so desired). After all, when making the initial submission
    we are in the same situation (no file yet), so it can't be that bad, as long as this is checked for at a later stage.
    - Show that Replace button which seems to be hiding! If it is a Silverlight issue, why require Silverlight in the first place?
    P.S.: I am experiencing this with IE (no Replace button, Windows 8.1 x64 and latest updates).

  • Vector.contains()

    Hi,
    I have a question about Vector.contains(). The documentation for Vector.contains() says:
    Tests if the specified object is a component in this vector.
    Returns true if and only if the specified object is the same as a component in this vector, as determined by the equals method; false otherwise.
    Since Vector.contains() takes an Object as a parameter and Object.equals() takes and Object has a parameter I assumed that Vector.contains(a) would return true if at least one object in the Vector returned true for .equals(a). But it seems to me (after some pretty simple testing) that the two objects HAVE to be of the same class, yet it does not actually say this in the documentation.
    Can someone explain to me why this is the case, or tell me that I am somehow doing somthing wrong? I dont have somple simple test code but I dont want to post it here intitiall as I might scare people off :p. I spend hours debugging this simple problem.. grr :S.
    Anyway,
    Thanks in advance.

    Thanks for your quick replies!!
    Do you not think this is a given? How is it possible for two objects to be the same if they are different classes?I'm not saying that its not logical, its just that the documentation doest actually specify that the classes have to be of the same type to be found. You might, for example, want to search a list of 'Person' objects for a person with a particular name. In this case (where a is defined as Vector<Person>), you might want to call a.contains("Barry"). Based on the documentation I would have thought this to be possible, as long as the Person.equals() function handled it correctly.
    Here is my test code:
    import java.util.*;
    public class Test
            static class MyClass
                    String myValue;
                    public MyClass(String val)
                            myValue = val;
                    public boolean equals(Object o)
                            return o.toString().equals(myValue);
                    public String toString()
                            return myValue;
            public static void main(String[] args)
                    Vector<MyClass> v = new Vector<MyClass>();
                    v.add(new MyClass("TEST1"));
                    v.add(new MyClass("TEST2"));
                    if (v.contains("TEST2"))
                            System.out.println("Contains!");
                    else
                            System.out.println("Does not contain!");
    }In this case "Does not contain!" could be printed out. If i change the line
    if (v.contains("TEST2"))to
    if (v.contains(new MyClass("TEST2")))then "Contains!" is printed out. I would have thought both should work :S.
    Thanks again
    - Robert.

  • Can not see the device net Master Interface in my project.

    Can not see the device net Master Interface in my existing project. Need to Modify exististing code. Can not recomiple and create exe file after making changes. Error says the vi's are broken. Tried re-installing industrial communications for device net but get an error saying a newer version is already installed. Do I need to plug my computer into the device net scanner to fix this?

    Assume the installation disk is an OS X disk? If it's the original one that came with the system (grey-colored disk versus black retail disk) have you tried to hold the alt key down when you boot? This would allow you to choose the Apple hardware test. If you can do this, choose the Apple hardware test, click the arrow to the right, and when prompted choose the extended test. Does that give you any errors or messages about a hardware problem?
    Are you able to hold the C key down when you reboot, to boot off the installation disk?

Maybe you are looking for

  • Report to check the WBS "system status"

    Hello friends, Would anyone know for a standard report where I can check for the WBS "system status"? i.e.: I want to know everything I have in AVAC status Thanks and Regards Alex

  • Reverse back to Tiger 10.4.x

    What's the best way to downgrade from Leopard back to 10.4.x? Since upgrading to Leopard I can no longer print. Others have encountered similar problems (check the printing forums). Anyway I was think of going back to 10.4 until HP or Apple can put t

  • Vendor/Customer balances carryforward issue

    Hi Team, My Client last year (2008 ) not carryforward the vendor/Customer balances through F.07. But this year (2009) carryforward the balances. The thing is cumulative balances not showing properly since 2008. In this senario can I carryforward the

  • How to count the  number of files read through  sender file adapter

    Hi  , I have a scenario where I am reading  files from a third party system and trying to send those files to R/3 system .The frequency is 1 file per day .But there can be situation where  the source system can put  2 to 3 files in source folder and

  • Creative Entertainment Cen

    i use my?Remote with my sound card (Soundblaster Audigy 4 Pro)every time i press a button creative entertainment center opens as much as it is usfell i was wondering if u could put in a option to disable the opening of the entertainment centerand pos