How a collection embedded inside another collection can be read???

Is there anybody can provide me with a small exemple of how I can access the element inside a collection (set) embedded inside another collection itself embedded inside another collection. Each collection is declare in their own class.
i.e. Class 1
private Set col2 = new HashSet;
Class 2
private Set col3 = new HashSet;
Class 3
private Set col4 = new HashSet;
How can I read the element belong to col4 since the col4 is accessible through col3 and col3 through col2????
Hope I am clear enough. Could someone help???
Thanks

hi,
If set contains set0, set1, set2 at 0 ,1 ,2 index
and u want to get the element at index 3 of set1 then u should proceed as :-
Set set = new HashSet ();
Set set0 = new HashSet ();
Set set1 = new HashSet ();
Set set2 = new HashSet ();
set0.add("hello");
set.add(set0);
set1.add("how");
set1.add("are");
set1.add("you");
set.add(set1);
set2.add("i")
set.add(set2);
Iterator iter = set.iterator() ;
iter.next();
Set outSet = (HashSet)iter.next()
And now iterate through this set to get the required element
Gaurav

Similar Messages

  • How many Collections can you have in iBooks?

    How many Collections can you have in iBooks?  I have many and now I'm unable to add more collections.  Is there a way to add more collections/shelves?

    Hi Joe,
    There is no "upper limit" on the number of tasks that you can have in a plan. Having said that, the complexity of a plan -- including conditions and the use of external tasks -- can certainly be a factor in response times.
    Having said this, 30 seconds seems like a long time and I strongly suggest that you open a case with customer care on this item.
    We have alerted them to be looking for a case from you.

  • How do I change language if I can't read the menu?

    How do I change the language if I can't read the menu?

    Hello Mminge,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    Apple TV: Changing language settings for system and playback
    http://support.apple.com/kb/HT5255
    Change the system language
    Settings > General > Language
    Best of luck,
    Mario

  • How to Execute RMDATIND inside another Background Job using a variant?

    Hi,
    It is only possible to start RMDATIND (direct input) in background from transaction BMV0 u2013 it is impossible just to place the program in another job in SM37 or SM36.
    In a related thead I saw : u201DSolved my self by using BI_START_JOB. If I use this function module along with RS_CREATE_VARIANT and RS_VARIANT_DELETE. u201C
    Following is the link to that thread
    Re: Problem in using JOB_OPEN, JOB_SUBMIT & JOB_CLOSE
    RS_CREATE_VARIANT (Creating a variant (not using a selection screen))
    RS_VARIANT_DELETE(Variant to be deleted)
    BI_START_JOB
    Can some one provide me with all the parameters required to execute the above Function Modules?

    Hi,
    Refer below thread:
    Process Control in Confirmation Parameters
    All the relevant details are explained in detail..
    Best Regards,
    Siva

  • How do I resolve PP 1.5 'can't read memory' error ?

    How do I resolve the following error that occurs when working in PP 1.5 & when exiting?
    Premiere Pro.exe application error. The instruction at 0x696352cb referenced memory at 0x000000bc. The memory could be for read.
    Have already reinstalled PP1.5 & still get the error. Microsoft Techs have reviewed the issue on my computer and determined my system is healthy & up to date. Have been using this PP1.5 on same computer with Windows XP Fully Updated & virus free Home Version for years & this error just popped-up recently. Although I also own PP CS5.5 and use it on another computer with Windows 7, I am comfortable using 1.5 and would like to correct this error. Your thoughts are most welcome. Thank you.

    You possibly has a program, or process, that is loading at bootup, and it is not playing nice with the memory addresses. It could be mis-reporting the addresses used, or could be telling the OS that it has released certain memory addresses, when it has not.
    See this ARTICLE for tuning up your OS and your system, especially regarding unnecessary programs, and processes, that load at bootup.
    Good luck,
    Hunt

  • How to install Unicode fonts (so I can see/read Hebrew, Arabic, Syriac)

    I need to be able to see/read Hebrew, Arabic, and Syriac. I have Unicode fonts, but how are these installed on the Droid X? 
    Ideally, I need to also install a keyboard for these. 
    >(

    The unicode font is indeed within the software, but the proper font package is not installed to support the actual characters. Hope this helped!

  • Fonts in things like Help are way to small. I have Firefox set for size24 but Help and lots of other things show up in say a size 12. How do I correct this. I can barely read this help screen.

    No other details. It is all in the question.

    No other details. It is all in the question.

  • Combo-box or OVS inside another OVS

    Hello,
    I have a question about OVS. I have created an OVS, it uses a BAPI to search the result. The problem is that I want to have a combo-box (“select” in html…) in one of the OVS input fields, the combo is filled with a other bapi results. Is this possible?
    Other solution could be adding an OVS inside  another OVS, can I do this?
    Regards and many thanks.
    Pablo.

    Pablo,
    The UI generated for OVS is automatic, done by the webdynpro framework. So in my opinion and to my knowledge, there's no way to modify that UI, add a field or change a field.
    Hope that helps.
    Instead you can build a popup which looks similar to OVS UI, have your combo box in it and use OVS inside  this popup (if you require). This option gives you more control over the search help.
    Cheers,
    Rajit

  • How to export in a format Quicktime can read?

    I'm using CS4 on Mac OS X 10.6.2.  I've created an image sequence movie with Quicktime Pro, which resulted in a 5.81GB file.  I then imported the movie into Premiere to compress it.  The export settings from Premiere were:
    - H.264
    - 24 frames
    - Progressive
    - Square pixel
    - 1920x1080
    - NTSC
    - There is no audio but media encoder will throw an error if audio isn't selected in the export.
    The output file is a m4v and is 32.9MB.  Neither iTunes nor Quicktime can read this file.  How do I export so the file can be read by Quicktime and also retain a small overall file size?

    Not directly from Lightroom unfortunately. I am assuming you want the pdf as the final output to send to people instead of a physical book from a commercial printing company. To achieve this you can fairly easily combine the pdfs outside of Lightroom. On the Mac, you can do this in Preview where you simply drag the page thumbnails between pdf documents. On a PC you need to use a program like Acrobat.

  • I just got my Turbo last night and the language changed.  Does anyone know how to change the language?  Since I can't read it I can't tell where to change it?

    I just got my Turbo last night.  Some how the language changed.  Since I can't read it, I don't know where to change it.  Can anyone help me?

        amerst722,
    Oh no! Let's get you back to the correct language. Here are the steps you can follow to change the language back.... http://vz.to/15H11Ee The Lanugage and input option under settings will have a square is the letter A in it.
    LindseyT_VZW
    Follow us on Twitter @VZWSupport

  • How can I insert a folder inside another folder

    is it possible to have sub folders
    I want to create 3 main folder
    MainFolder 1, mainfolder2, mainfolder3
    And I want to have 5 folders inside mainfolder 1
    so when the user click on mainfolder 1 , will see 5 folder in it , not next to it
    sincerely yours
    Riade Asleh

    So far I have not got any solution
    i want a folder inside another folder
    for example
    i have to main folders , folder 1 , folder2
    folder1.top =25
    folder1.left =10
    folder2.top =25
    folder2.left =115
    now, I wan a sub folders inside folder1
    subfolder1.top =50 not 25
    subfolder1.left =30
    I dont' want the subfolder1 to have the same top as folder1.top
    it's seems that all folders must have the same top value
    because when I changed the value of the subfolder1.top to 50, the value of folder1.top, and folder2.top  changed to 50, in which i don't want it to behave like that
    if you have a sample code,  please sent it to me
    sincerely yours
    Riade Asleh

  • How to collect to different files into one message

    Hi,
    I have the following scenario:
    Two (5Mb) Files with different file structures each ->
    XI (transform and generate a single structure record) ->
    Insert a record in a DB for each new record generated
    Let suppose file1 has order headers - one order per line -and file2 has the corresponding order items - one item per line, e.g;
    File 1
    OrderNr  Description
    1        A
    2        B
    3        C
    File 2
    OrderNr   ItemNr   MaterialCode ....
    1         1        111
    1         2        222
    1         3        555
    2         1        888
    2         2        777
    3         1        111
    Imagine I want to insert a record in the database for
    each order/item like this
    OrderNr  ItemNr Description MaterialCode .....
    1        1      A           111
    1        2      A           222
    1        3      A           555
    My real scenario is a little more complicated but never mind for now.
    I need to collect the two different files with two different file structures into the same message. Although I have read about the subject I am not sure about how to do it using BPM because there isn't any field I could use to correlate file1 with file2 - I can only correlate a record of file1 with several records of file2. I simply know that the two files will be available in a specific directory once a day at 06:00AM.
    First question is:
    How can I collect the two messages originating each from a different file into only one message with two different subtypes one for each file structure?
    Because my background is ABAP I could do it with a workaround for temporarily storing the info from each file into database tables in XI and then correlate the info from the two files to generate a single message.
    Like this
    File1 -> XI -> INSERT DATA XI ZDB1 (via ABAP Proxy or RFC)
    File2 -> XI -> INSERT DATA XI ZDB2 (via ABAP Proxy or RFC)
    Them I could use an event to check when the two tables have all the data from both files. I could then combine the data from the two tables and start another integration process like this
    XI SERVER (ABAP Proxy) -> XI Integration Server -> Third-party (JDBC)
    But this way I would have to code the hole data conversion which is not a good idea from the perspective of XI (EAI/Broker).
    Maybe I sould use BPM. But how?
    Futhermore:
    Is BPM performant enough (we are talking about files with thousand of records)?
    Thanks in advance
    Diz

    Hi,
    for N:1 Multimapping you have to use BPM.
    After going through this weblog you will be quite familiar with how to collect 2 messages into one message.
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm
    Steps:
    1. Create a abstract/ inbound / outbound interfaces. (in your case 3 /1/2).
    2. Perform 2:1 Multimapping.
    You can specify more than one message in either side.
    Just go to message tab in MM.
    3. Now follow the blog and you will get a output in the form of abstract interface.
    4. Define JDBC reciever Channel as usual.
    Your database will be updated.
    Just try this out.
    Regards
    Piyush

  • How to put an MSO inside another MSO

    Hello all!
    An interesting question came up in the following post by Folobo:
    http://forums.adobe.com/message/4572897#4572897
    "Is it possible to use a slideshow embedded in a big overlay slideshow?"
    I'd like to rephrase this question:
    "Is it possible to put a MultiStateObject (MSO) inside another MultiStateObject?"
    And further: if the answer is "yes", could we put that to use with the DPS?
    @Folobo – this is an interesting question. A quick test is showing that you cannot do it in the UI (correct me if I'm wrong).
    Let's try it this way:
    If you have two objects:
    1. an MSO #1 (with two rectangles, rectangle #1, rectangle #2)
    2. Another rectangle on the page: rectangle #3
    Now select the two objects and make an MSO out of it (using the "Object States" panel).
    You would think, now I get an MSO with two states, state 1 with rectangle #3 together with state 2 with MSO #1.
    But not so:
    Result: One new MSO with three states (rectangle #1, rectangle #2, rectangle #3)
    Hm. I don't give up on that. Let's try it another way:
    Could we select at least two objects inside a state of an MSO and make that a new MSO?
    Sure, We could select two objects inside a state, but since we are *inside* an MSO the "Object States" panel does not show the possibility to make a new MSO. You can only add states or add objects to states…
    Frustrating. End of story? Maybe…
    Be forewarned. The following is highly experimental!
    Let's try it by scripting (ExtendScript/JavaScript).
    The scripting reference is showing that an MSO "MultiStateObject" object has an add()-method. And further on, that add()-method could be applied to:
    Document
    Spread
    MasterSpread
    Page
    Layer
    pageItem
    And that is the key to a possible solution. We could add a new MSO to a "pageItem" object.
    A simple rectangle should be qualify for a "pageItem" object; and that, of course, could reside in a state of an MSO.
    So, we could add a new MSO to a rectangle inside of a MSO!
    How can we access a rectangle inside a MSO? Easy: We could select it and work with that selection.
    So let's do that: select the rectangle in the first state of an MSO and run this one-line-script (be sure you did select the rectangle and not the MSO or one of its states:
    app.selection[0].multiStateObjects.add();
    We now have an MSO inside another MSO!
    Explanation:
    A "generic MSO" was added with the add()-function to a selection (the container object: in our case the selected rectangle).
    The "generic MSO" is a two state MSO consisting of one rectangle in each state of a very small size (10px x 10px).
    At first it is invisible, because it is very likely that it is positioned outside the geometric bounds of its container object (the rectangle).
    But we can customize this!
    Go to the layers palette and select the new MSO, move it inside the geometric bounds of its container object, readjust its size, add states as you wish, populate the states with images, and other objects etc.pp.
    So, what can we do with an MSO inside another MSO? (As I already said, this is highly experimental.)
    My experiments with that are very fresh. I did not try a lot. But it seems that we could at least autoplay this MSO.
    I have to test more thoroughly what is possible and what will work with buttons etc.pp…
    I really like to hear from you what you will find out and if you can put it to any use.
    Uwe
    Message was edited by: Laubender

    @Mobly – in case it did not work out for you, here some screen grabs for the different steps:
    1. Select an MSO:
    2. Select a "graphic frame" inside the MSO; in this case a "<square>"; you can see the big blue dot in the Layers panel behind the generic name "<square>":
    3. Open the Scripts Panel and select the script:
    4. Run the script by double-clicking the script; the generic name of your selected object has changed to "graphic frame", but trust me, it's still a square…
    5. Click the "Ok" button of the message and InDesign will select the new MSO ("Multi-state 2") as you can see here. It has two states with one rectangle each,  fill and stroke is "None":
    And: you can see that this new MSO is nested inside the MSO ("Multi-state 1").
    What you do with that construct is up to you:
    6. Color the "<square>" of state 1 of "Multi-state 2":
    7. Resize and change position of "Multi-state 2":
    8. But remember: "Multi-state 2" is nested in the graphic frame you selected before running the script:
    I hope you get the picture now…
    Uwe

  • How to collect adjacent duplicates ?

    Hi,
    duplicte values can be deleted using 'DELETE ADJACENT DUPLICATES'. But how to collect the field values that are duplicated into another internal table.

    Hi Sharmila,
           You can use the statement 'FIND IN TABLE itab ' for your purpose. Have a look at following code.
    Ex:
    TYPES:
    BEGIN OF ty_itab,
             name  TYPE char10,
             id    TYPE numc5,
           END OF ty_itab.
    DATA:
    itab     TYPE STANDARD TABLE OF ty_itab,
          itab2    TYPE match_result_tab,
          itab3    TYPE STANDARD TABLE OF ty_itab,
          wa_itab  TYPE ty_itab.
    CLEAR wa_itab.
    wa_itab-name = 'Test'.
    wa_itab-id   = 1.
    APPEND wa_itab TO itab.
    CLEAR wa_itab.
    wa_itab-name = 'Test'.
    wa_itab-id   = 1.
    APPEND wa_itab TO itab.
    CLEAR wa_itab.
    wa_itab-name = 'Test'.
    wa_itab-id   = 1.
    APPEND wa_itab TO itab.
    CLEAR wa_itab.
    wa_itab-name = 'Test2'.
    wa_itab-id   = 2.
    APPEND wa_itab TO itab.
    CLEAR wa_itab.
    wa_itab-name = 'Test2'.
    wa_itab-id   = 2.
    APPEND wa_itab TO itab.
    CLEAR wa_itab.
    wa_itab-name = 'Test3'.
    wa_itab-id   = 3.
    APPEND wa_itab TO itab.
    CLEAR wa_itab.
    wa_itab-name = 'Test4'.
    wa_itab-id   = 4.
    APPEND wa_itab TO itab.
    CLEAR wa_itab.
    SORT itab.
    Logic
    LOOP AT itab INTO wa_itab.
      AT NEW id.
        FIND ALL OCCURRENCES OF wa_itab
        IN TABLE itab
        RESPECTING CASE
        RESULTS itab2.
        DESCRIBE TABLE itab2 LINES v_count.
        v_count = v_count - 1.
        IF NOT v_count IS INITIAL.
          DO v_count TIMES.
            APPEND wa_itab TO itab3.
          ENDDO.
        ENDIF.
        CLEAR: wa_itab.
      ENDAT.
    ENDLOOP.
    But you have to keep in mind that..the field which is used along with AT NEW statement should be
    last one in your internal table so that it checks all the components left of that field for duplicates.
    If you want any more help, you can get back to me.
    Regards,
    Jallu

  • How to use one hash table inside another hash table

    Hi everyone,
    Any example of hash table inside another hash table.
    Can one here help me how to write one hash table inside another with repeating keys for the first hash table.
    Thanks,
    kanty.

    Do you mean you want the 'value' entries in a hash table to themselves be hash tables? Easy but this often indicates a design flaw.
    Hashtable<String,<Hashtable<String,Value>> fred = new Hashtable<String,<Hashtable<String,Value>> ();But what do you mean by "with repeating keys for the first hash table"?
    Edited by: sabre150 on Jul 2, 2010 10:11 PM
    Looks like you have already handled the declaration side in your other thread. I suspect you should be writing your own beans that hold the information and these beans would then be stored in a Map. The problem I have is that your description is too vague so I can't be certain.

Maybe you are looking for

  • FindNode returning Null And XML Not Accepting Special Characters

    Hi All, i am trying the get the attribute value in the element "ns4:InfoCFDi" using FindNode method, but the method is returning NULL. I used the same code for other sample as well and was successfull. but for this specific XML file(which is below) I

  • I need help! Something about playlists

    Hey there, I connected my iPod to my pc about a week ago but I had too many songs so it automatically created a playlist which did not select all the songs. I then deleted some songs from my library and deleted the playlist, but now when I try to upd

  • Connect SAP R/3 to Portals

    Hi, Need help creating a connection to SAP R/3. Firstly, Can we use EP to connect to R/3 4.6C version ? I have the following paramters when I create a SAP system in 'System Landscape' in EP. I dont see an entry for client, host, user, app server etc.

  • X79-GD45(8D) with multiple raid0 arrays

    Hello everyone, I would like to upgrade my computer soon and I was checking different motherboards for an i7-3930K processor. The X79-GD45(8D) seems pretty good for such a low price motherboard for this socket. However I intend to have 2 different ra

  • PowerMac keeps shutting down

    Hello all! My PowerMac G4 has been shutting down by it's self lately. It's not a proper shut down, it just dies. Last night, the monitor flicked off, then on, then off, then the computer just died. I hit the power button, it starts back up, runs a co