How to refernce the set in a implementation of java.util.AbstractSet?

Hi, I have to extend abstract set and so I have to overwrite the add
method. I want to use the provided equal function,
to do the duplicate checking. But since the equal method takes only one parameter, I can't use an own collection class to manage the content.
So how can I access the default set, to add an element?
Thanks a lot in advance.
Greetings Michael

Hi, I had study the source-code and it seems that I have to implement a own structure to store the data (or use another collection).
The equal method is only suitable to compare the other collection and to prevent adding itself to it.
So the add-method must do the duplicate checking by calling contains().
Every other method uses the iterator-method, which itself remains abstract. So this is the vital method.
By the way, I had to extend this class to get a set, that remains the order of adding (which Hash- and TreeSet don't).
Greetings Michael

Similar Messages

  • How to use the set functions effectively in webi ,please let me know with detail

    how to use the set functions effectively in webi ,please let me know with detail

    Hi,
    we use use set functions on heirarchies with aggregate functions mostly .
    If you include member_set, Min returns the minimum value of the aggregated data for all members in the member set.
    Member_set can include multiple sets separated by semicolons (;).
    The list of member sets must be enclosed in {}.
    If the member set expression does not specify a precise member or node, the hierarchy referenced must be present in the table, then the member set expression references the current member in the hierarchy in the table. If the hierarchy is not in the table, the function returns the message #MULTIVALUE.
    Eg .
    1)     Ancestor
    =Sum([YTD] ; {Ancestor([Test Hierarchy];2)})
    2)     IsLeaf
    =[Test Hierarchy].IsLeaf
    You can use this function when you want to show your Measure only at lower level .
    3)     .Depth
    =[Test Hierarchy].Depth
    This is also function used with hierarchy to find Level of Members .
    Follow this link for PDF reference .
    Page 147
    https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&ved=0CDIQFjAB&url=https%3A%2F%2Fhelp.sap.com%2Fbusinessobject%2Fproduct_guides%2Fboexir4%2Fen%2Fxi4sp5_ffc_en.pdf&ei=nBAUU-iUM4WWrAeMuoCoDg&usg=AFQjCNHakXsEjd_yUk2y3lVdibf3PXpEOA&bvm=bv.61965928,d.bmk
    search on SCN this question was discussed before also one those links .
    http://scn.sap.com/thread/3183380
    Hope this will help you .

  • How to save the setting in MDM import manager?

    How to save the setting in MDM import manager? After I configure all things in MDM import manager, I try to save the setting, let's say, saved map name is " Test002", and then I export this map into desktop. After that, I logon Import manager again, and import this map file, system show me the same thing that I have to configure it again, because nothing was changed, what I configured before, were all disappeared.

    Hi Alfred ,
    are You not saving this map in Import Manager ? Import Manager itslef saves the map and remember it . Exporting map is only for backup .
    Pls make changes and save the map . Exit and relogin . then see the map . It should be there . Pls let us know the result .
    - An

  • How to use the set full screen mode ?

    hai...i' a newbie ..i hav one question ...how to use the set full screen mode for my application..
    i found.
    public void setfullscreenmode (boolean mode)
    but when try in my application it error and other
    canvas.setfullscreenmode(true);
    actually i don't know where i should put this code

    i also found the coding it use like
    setFullScreenMode (true);
    but when i apply it ..it error because cannot resolve the symbol.
    my question is which one i should use; declare the
    public void setFullScreenMode (boolean mode);
    first or use
    setFullScreenMode (true) ;
    or other way ..what i need to do to use setFullScreenMode

  • Some how I missed the set up assistant on my mac mini now I can't set up user accounts as I don't have a password ...help

    some how I missed the set up assistant on my mac mini now I can't set up user accounts as I don't have a password ...help

    Hmmm, did it come with an Install Disc? What OSX version is it?
    I wonder if this old method still works...
    Reset OS X Password Without an OS X CD...
    http://theappleblog.com/2008/06/22/reset-os-x-password-without-an-os-x-cd/
    It'll boot like a newly setup Mac, if it works.

  • I forgot how to use the setting, move the mouse to the upper left corner and the windows become smaller for an overview?

    i forgot how to use the setting, move the mouse to the upper left corner and the windows become smaller for an overview?

    I'm not quite sure what you want - if you want an overview of all open windows, use the F key.. Otherwise please post back and be more specific.

  • My Ipod was disabled... Can you please suggest me how to enable the set?

    My Ipod was disabled... Can you please suggest me how to enable the set?

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                          
    If recovery mode does not work try DFU mode.                         
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings         
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • How to get the today's julian date in java?

    how to get the today's julian date in java?
    hi can any one tell me how to get the todays julian date using Calender class or GregorianCalender class....
    Julian date for 2006.November.01 AD 05:54 PM : 2454041.0
    i have tryied with
    calJ.setGregorianChange(new Date(Long.MAX_VALUE));
    System.out.println(sdf2.format(calJ.getGregorianChange()));
    thanks
    Tushar
    Message was edited by:
    lad_tushar

    thanks a lot....for intrest....
    I have found some details about the Julian calendar as follows:
    The Julian date for 2006: JAN: 01:12:01:59 is 2453737.00138
    245 represent the year digits for year 2006
    3737 represent the date fir 1 Jan
    .00138 represents the time for 12:01:59
    Julian date change as per every day 12 noon it increase one digit in it.
    As per ref from
    http://www.aavso.org/observing/aids/jdcalendar.shtml
    Also chk this calendar where Julian date is 20. October 2006 for 02 November 2006
    As per ref from
    http://www.calendar.sk/julian_calendar-en.php
    I have tried the pure �GregorianCalendar� class from jdk1.4 API and its setGregorianChange method but not getting as per the expected Julian date format. Using the �setGregorianChange()� i have setting the cutover date to Long.MAX_VALUE it means GregorianCalendar now have to act as per the Julian calendar ...so after setting the cutover date it return me changed date using �getGregorianChange()� but that was not the Julian date of the current date...as expected or as per above both scenario. Even though the last two digits are nowhere equal to the actual Julian date.
    Program
    GregorianCalendar cal = new GregorianCalendar();
    cal.setGregorianChange(new Date(Long.MAX_VALUE)); // setting the calendar to act as a pure Julian calendar.
    // cal.set(Calendar.DATE, new Date().getDate()); // seting the current date
    // Date todayJD = cal.getGregorianChange(); // getting the changed date after the setGregorianChange
    Date todayJD = cal.getTime(); // getting the calculated time of today�s Julian date
    SimpleDateFormat sdfJulianDate = new SimpleDateFormat("yyDDD");
    SimpleDateFormat sdfJuliandayOfYear = new SimpleDateFormat("DDD");
    System.out.println("today Date = " + new Date());
    System.out.println("Today as julian date = " + sdfJulianDate.format(todayJD));
    System.out.println("Today as day of year = " + sdfJuliandayOfYear.format(todayJD));
    OUTPUT:
    USING : Date todayJD = cal.getGregorianChange();
    Today Date = Thu Nov 02 15:17:05 IST 2006
    Today as julian date = 94229
    Today as day of year = 229
    USING : cal.set(Calendar.DATE, new Date().getDate());
    Today Date = Thu Nov 02 15:19:22 IST 2006
    Today as julian date = 06319
    Today as day of year = 319
    USING : Date todayJD = cal.getTime();
    Today Date = Thu Nov 02 15:17:59 IST 2006
    Today as julian date = 06306
    Today as day of year = 306
    There is one another concept i found to get the Julian day of the year as per the Julian day chart mention on nasa site (http://angler.larc.nasa.gov/armsgp/JulianDayChart.html) and i m getting the moth of the year that is 306 for nov 02 2006 using getTime() method in above code then the out put is right for Julian day. But it was not as per the expected Julian date format. So in conclusion we can only able to retrieve the day of year for the Julian calendar. hope their will be a solution for this problem in java api ....else we allways have to depend upon the third party api that was not accepteble some times.....
    Kindly chk chart on the site
    http://angler.larc.nasa.gov/armsgp/JulianDayChart.html
    http://weather.uwaterloo.ca/julian.html
    http://www.fs.fed.us/raws/book/julian.shtml
    Thanks,
    Tushar Lad

  • How to cooperate the current mail system with Sun Java Commnication Suite 5

    Dear all and Shane,
    Excuse me for bothering you again.
    Due to time limited, I would like to know how to cooperate the current mail system with Sun Java Commnication Suite 5. I mean I would like to use current mail system (mailscanner + postfix + courier-IMAP + clamav + spamassassin + webmail) and use the outlook connector to connect to Sun Java COMMS 5 to share the calendar, contacts only.
    Right now I have done the testing by using outlook, mac mail, thunderbird to share calendar,contacts via Sun Java COMMS 5 in Centos Linux 5.
    My plan is as following
    1. Sun Java Communication suites 5 server ( I called it comms5 ) will be in DMZ zone and will open the necessary ports in firewall.
    2. I will create more than six sub domain name in Sun Delegate server and the necessary accounts within these domain names.
    3. All messages will be transmitted via Postfix and clients will retrieve from Courier-IMAP
    4. All Clients included other branch offices will use different mail clients to share their calendars, contacts via COMMS5 ( But how will COMMS handle the messages such like invitation ? )
    Any suggestions will appreciate.
    PS: Is it possible to classify the contacts in outlook address book ?
    For example, when user click the receiver, it will show like as following
    GLOBAL ADDRESS BOOK
    --Director
    --and so on
    ----CN.BRANCH OFFICE
    -----------CN01 EMAIL ADDRESS
    -----------CN02 EMAIL ADDRESS
    -----------CN03 EMAIL ADDRESS
    and so on
    ----JP.BRANCH OFFICE
    -----------JP01 EMAIL ADDRESS
    -----------JP02 EMAIL ADDRESS
    -----------JP03 EMAIL ADDRESS
    and so on
    ----TW.BRANCH OFFICE
    and Due to the user account is located in CN.BRANCH OFFICE, it will extend the CN.BRANCH OFFICE contacts level.
    Excuse me for bad English, hope you can understand it.
    Best Regards,
    Bruce

    Dogz wrote:
    Due to time limited, I would like to know how to cooperate the current mail system with Sun Java Commnication Suite 5.
    I mean I would like to use current mail system (mailscanner + postfix + courier-IMAP + clamav + spamassassin + webmail) and use the outlook connector to connect to Sun Java COMMS 5 to share the calendar, contacts only.Getting your current mail system to 'co-operate' in this way will require more time then simply migrating the accounts of users on the current mail system to the comm-suite-5 installation and making use of UWC for Webmail access and ClamAV/SpamAssassin integration within the messaging MTA.
    Also the use of Outlook Connector with a non-Sun IMAP backend isn't supported, nor is the use of a non-Sun IMAP backend possible with UWC.
    Right now I have done the testing by using outlook, mac mail, thunderbird to share calendar,contacts via Sun Java COMMS 5 in Centos Linux 5. Once again I should remind you that CentOS is not a supported platform for comm-suite-5
    Regards,
    Shane.

  • How to check the JDK version of a compiled java file

    can anybody tell me how to check the JDK version of a compiled java file ?
    Edited by: gbhatia8 on Sep 9, 2010 7:04 AM

    The major/minor version of the class file is the way to go.
    Also, it's not necessary to write a separate program to get to those. javap prints them out when being passed the -v flag.
    Note, however that "JDK version" is not a correct term, as I can create 1.4-compatible class files with a Java 6 JDK (by passing the -target flag to javac). Those won't look any different than .class files written with a 1.4 JDK.

  • Can we change the setting of Internet Explorer by Java Script?

    Can we change the setting of Internet Explorer by java script?.
    For e.g: I need to make the "Initialize and script control not marked as safe" as enabled by using java script code.
    Please suggest me is it possible?
    Thanks,
    Manisha

    Thanks everybody.
    My requirement is to push data of a grid to Excel by clicking a button. I have written code in javascript. But if the option in Internet Explorer "Initialize and script controls not marked as safe" is disabled , i am not able to push data to Excel.
    It is possible only this option is enabled.
    So tried to push data by write code: document.appletname.saveAsCSVFile();
    But i am not getting data in Excel in correct format.
    It is coming as : first row: Column name1, " column name 2",...
                             2nd row: value1, "value2",.....
    Any ideas on this?
    Thanks,
    manisha

  • Where to find .jar files so I can implement import java.util.logging

    I'm trying to figure out how to take an application built for Websphere and port it to WebLogic. I've come across this blog entry http://blogs.sun.com/fkieviet/entry/using_java.util.logging_in_bea_weblogic and would like to try creating and using the startup class.
    I have not been able to find the correct jar files.
    import weblogic.common.T3ServicesDef;
    import weblogic.common.T3StartupDef;
    import weblogic.logging.LoggingHelper;
    In reading the documentation on using the NonCatalogLogger APIs at http://download.oracle.com/docs/cd/E12840_01/wls/docs103/i18n/writing.html I also see some code calling for the following imports
    import weblogic.jndi.Environment;
    import weblogic.logging.NonCatalogLogger;
    1. Does anyone know where I can grab these?
    2. There must be a strategy for finding these .jars that people use. If so, what is it?

    I thought I understood you, but the more I look at what you've set here, I'll just be honest and admit that the I don't know what you are saying here:
    'You should be able to add the "weblogic.jar" in the WebLogic distribution to your classpath.' - What doe this mean?
    1. Go to my xxxWeb app Dynamic Web Project and right-click and select Build Path / Configure Build Bath / Libraries - Select Add external JARS and navigate to the weblogic.jar
    2. Go to my xxxWeb app Dynamic Web Project and right-click and select Build Path / Configure Build Bath / Libraries - Select Add Library and try to go from there?
    3. Go to my xxxWeb app Dynamic Web Project and right-click and select Build Path / Configure Build Bath / Libraries - Select Add Variable and try to go from there?
    4. Go to my xxxWeb app Dynamic Web Project and right-click and select Build Path / Configure Build Bath and do something else?
    5. Something else?
    Also, I don't know what you mean here:
    'You don't need to (and you shouldn't) copy that jar file, just have it in your compilation classpath. It will be present automatically at runtime.'
    Sorry for being so simple here but I've been trouble shooting why I can't follow what look like pretty simple steps to implement over-riding the ApplicationLifecycleListener Class to use existing java.util.logging.Logger code by adding the following to the the weblogic-application.xml:
    <wls:listener>
         <wls:listener-class>com.qualcomm.weblogic.log.listener.UtilLogWrapper</wls:listener-class>
    </wls:listener>
    And including as a referenced jar file, a simple POJO class instance of com.qualcomm.weblogic.log.listener.UtilLogWrapper.
    My resrouces for this are:
    1. http://blogs.sun.com/fkieviet/entry/using_java.util.logging_in_bea_weblogic.
    2. http://www.oracle.com/technology/pub/articles/drolet-ant.html.
    Maybe my weblogic.jar is at the root of the problem.
    I hope you can 'dumb this down' for me with a simple explanation of steps to do what you outlined above.

  • SFTP: The invocation resulted in an error: java.util.NoSuchElementException

    I have created a business service using the SFTP protocol.
    When testing the BS, I received the "known_hosts doesn't exist or doesn't have read permission" error, which I resolve by placing the known_host file in $Domain_Home\config\osb\transports\sftp
    But now I have got another error "The invocation resulted in an error: java.util.NoSuchElementException". Does anyone know what this error refers to? I have already set the filename through the transport header.

    I have created a business service using the SFTP protocol.
    When testing the BS, I received the "known_hosts doesn't exist or doesn't have read permission" error, which I resolve by placing the known_host file in $Domain_Home\config\osb\transports\sftp
    But now I have got another error "The invocation resulted in an error: java.util.NoSuchElementException". Does anyone know what this error refers to? I have already set the filename through the transport header.

  • The invocation resulted in an error: java.util.NoSuchElementException

    I am trying to implement sftp protcol for oracle service bus using business service.
    While invocation it is throwing "The invocation resulted in an error: java.util.NoSuchElementException" error.
    Does any one know the reason for it?

    known_hosts file must contain data & hostname and IP address must be separated by a comma.
    e.g. localhost,127.0.0.1 ssh-rsa ABCDEF............==
    Regards,
    Anuj

  • How to devide the set of records into groups in SQL itself.

    Hi , i am using 10.2.4.0 of oracle.
    I am having one requirement, in which i have to devide the set of records into certain groups , so that they can be executed partly but not in one run.
    So in the 'SELECT' clause itself i want to asssign particular value (may be 1 )to first 50000 records then another value(may be 2) to next 10000, like wise. And again the total count of records will also varry time to time , if the total count of record set is less than 10000 , then it should only assign '1' to all the records. i will set the group values (1,2,3...) as another column itself.
    Can you please let me know if this can be done in SQL without going for PLSQL?

    Hi,
    That's called a Pagination Query , and here's one way to do it:
    WITH     got_grp          AS
         SELECT     x.*
         ,     CEIL ( ROW_NUMBER () OVER (ORDER BY  x_id) 
                   / 50000
                   )          AS grp
         FROM     table_x  x
    --     WHERE     ...          -- If you need any filtering, put it here
    SELECT     *               -- Or list the columns you want
    FROM     got_grp
    WHERE     grp     = 1
    ;ROW_NUMBER () OVER (ORDER BY x_id)     assigns unique integers 1, 2, 3, ... to all all rows, in the same order as x_id (even if x_id is not unique).
    CEIL (ROW_NUMBER () OVER (ORDER BY x_id) / 50000)     maps the 1st 50,000 of those numbers to 1, the 2nd 50,000 to 2, and so on.
    Analytic functions (like ROW_NUMBER) as computed after the WHERE clause is applied, so, to use the results in a WHERE clause, then you need to compute them in a sub-query. If you just want to display the number, and not use it in a WHERE clause, then you don't need a sub-query.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    In the case of a DML operation (such as UPDATE) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

Maybe you are looking for

  • Error deploying Web application

    Hello Everyone, i have a problem with my web application that is not able to be deployed. the first time i deployed the application everything worked correctly i performed the contex lookup with no problem as was able to connect to the EJB applicatio

  • Adding image to graphic

    Hi, I am trying to add an image instead of a red square to the Performing custom painting demo. http://java.sun.com/docs/books/tutorial/uiswing/painting/refining.html I have loaded the image into the class, but can't work out how to display it in the

  • Restricting particular session variables being shared

    i am using weblogic 10.3. I have an EAR with has 2 WAR in it , with session sharing enabled in the weblogic-application.xml . I understand that this will make all the variables that are added in the session to be shared by both WAR, but i want a part

  • Regd Delivery doc..

    Hi, I am in the delivery screen VL02N. Some deliver doc is visible. How can I know which doc type is it without going to SPRO or VOV8 to check which delivery document is attached to the corr so?? Cheerz.. Subbz...

  • Urgent - Query on CL

    Can I create a query on ODS(change log table) object. I want to know how to do it if it is possible. Thanks, Sunita