Implementing a tree type structure - how?

I am fairly sufficient programming in Java, however I have never had the need to use (or learn) ways of implementing tree structures; therefore i'll try and explain carefully what i'm trying to achieve.
I need a method of grouping a small number of objects (no more than 20) in a logical way. The objects stored in the tree will be of the same class (the actual objects called 'wordObj' are quite basic, they only have 5 String fields).
The purpose is to represent a sentence of text, where each word is represented as a 'wordObj' object, into "meaningful" clusters.
For example, given the sentence:
"The pyramids were built in the egyptian city of Giza, 3000 years ago".
I want to represent the sentence in the following way:
ROOT (node 1): "Pyramids"
CHILD of ROOT (node 2): "Built"
CHILD of node 2 (node 3): "Giza"
CHILD of node 2 (node 4): "3000 years ago"
I have written an algorithm which extracts the information from the sentence so i'm not asking how to that; basically I need to find a way of creating the above tree structure within a single object. So the tree object can be passed between methods and the information held within it can be searched (I.e. get root node, retrieve child objects... etc) and the objects in the leaf nodes retrieved.
I hope I havent been to vague, any help or urls pointing to a suitable tutorial (which I cannot find) would be appreciated!
Thanks

For your example you might want lists (ordered children). Otherwise you could use it pretty much as-is:
final Node root = new Node("Pyramids");
final Node node2 = new Node("Built");
final Node node3 = new Node("Giza");
final Node node4 = new Node("3000 years ago");
root.getChildren().add(node2);
node2.getChildren().add(node3);
node2.getChildren().add(node4);(Edit)
Just to clarify, you would build the above tree however you want to, but would only need to retain the reference to the "root" node in order to pass it into search methods.
I should also point out that if you're planning to do a lot of this sort of thing and you're not committed to using Java, you should probably consider using LISP for which this sort of problem is pretty much its raison d'etre.
This online text is good: http://gigamonkeys.com/book/ and for learning how to do tree searches the Peter Norvig book is excellent: http://norvig.com/paip.html

Similar Messages

  • ALV  OOPS TREE TYPE STRUCTURE

    How can I make tree type display in ALV Grid oops concept ..eg.For one company code when we click all line items shld display
    Moderator message: please search for available information/documentation.
    Edited by: Thomas Zloch on Oct 24, 2011 3:00 PM

    For your example you might want lists (ordered children). Otherwise you could use it pretty much as-is:
    final Node root = new Node("Pyramids");
    final Node node2 = new Node("Built");
    final Node node3 = new Node("Giza");
    final Node node4 = new Node("3000 years ago");
    root.getChildren().add(node2);
    node2.getChildren().add(node3);
    node2.getChildren().add(node4);(Edit)
    Just to clarify, you would build the above tree however you want to, but would only need to retain the reference to the "root" node in order to pass it into search methods.
    I should also point out that if you're planning to do a lot of this sort of thing and you're not committed to using Java, you should probably consider using LISP for which this sort of problem is pretty much its raison d'etre.
    This online text is good: http://gigamonkeys.com/book/ and for learning how to do tree searches the Peter Norvig book is excellent: http://norvig.com/paip.html

  • How do I manage photos using a folder - subfolder type structure?

    How do I manage photos using a folder - subfolder type structure as I have done previously within Windows? For example, my photos were stored with a folder for each year and sub-folders for each month whicheach  held the photos. Can I do this in iPhoto?

    For example, my photos were stored with a folder for each year and sub-folders for each month whicheach  held the photos
    Why bother?
    Check out the search box at the bottom of the Window. (Click on the Magnifying glass, it opens it) Now click on the mgnifying glass in the search box) and select 'Date'. Now you can find all the photos from any day, month or year. If you want to find the photos from a range - say a paticular week - then you can do that with a Smart Album.
    Organising photos by date means you have to remember the date the shot was taken, and after a while, and after a few thousand shots, this gets harder and harder to do, so you spend more and more time rooting through folders.
    iPhoto offers a range of organising tools and each offers more possibilites to quickly find the shot you're looking for. For instance:
    I use Events simply as big buckets of Photos: Spring 08, July - Nov 06 are typical Events in my Library. I use keywords and Smart Albums extensively. I title the pics broadly.
    I keyword on a
    Who
    What
    Where basis (The When is in the photos's Exif metadata). I also rate the pics on a 1 - 5 star basis.
    Using this system I can find pretty much find any pic in my 45k library in a couple of seconds.
    So, for example, I have a batch of pics titled 'Seattle 08' and a  typical keywording might include: John, Anne, Landscape, mountain, trees, snow. With a rating included it's so very easy to find the best pics we took at Mount Rainier.
    File -> New Smart Album
    set it to 'All"
    title contains Seattle
    keyword is mountain
    keyword is snow
    rating is 5 stars
    Or, want a chronological album of John from birth to today?
    New Smart Album
    Keyword is John
    Set the View options to Sort By Date Ascending
    Want only the best pics?
    add Rating is greater than 4 stars
    The best thing about this system is that it's dynamic. If I add 50 more pics of John  to the Library tomorrow, as I keyword and rate them they are added to the Smart Album.
    In the end, organisation is about finding the pics. The point is to make locating that pic or batch of pics findable fast. This system works for me.

  • Anyone knows how to implement Decomposition Tree in Oracle BI products? to

    Hello Everybody
    Recently I'm trying to use Oracle BIEE plus to upgrade our old report service in our product. I'm a newbee to OracleBI products but I have a question that oracle support guys in our region also could figure out a clear answer. If anybody here can give me some clues it would be appreciated.
    I once used ProClarity BI product before, and ProClarity report service can provide a very powerful visualization tool like Decomposition Tree. I'm quite interested this function. But I searched many Oracle BIEE plus and ESSBASE documents, it seems Oracle BI can' implements the functional for which Proclrity Decomposition Tree can provided?
    Is there any body knows any other solution to implement Decomposition Tree in Oracle BI product?
    Thanks

    Appreciated the quick response:)
    Yes. I don't find the directory object .. I'm not very familiar with biee so far so might be me slight this object in my investigation.
    I need to check this object and see how it works.
    And thanks for your advise.

  • How to create multiple Tree Type Region In Tabular Form ?

    Dear Friends,
    i have to design tabular form to Distribute User Rioght to emp to access application
    eg if i have Three module in application
    1.Administration
    2.Attendance
    3.Accounts
    Module
    1 Administration have 5 Pages A,B,C,D,E.
    Module
    2 Attendance HAVE 4 Pages F,G,H,I
    Module
    3 Accounts HAVE 7 Pages J,K,L,M,N,O,P
    I need these three module divided into three section in tabular form as a tree Type like
    Module 1 Tree Open in Tabular Form like
    - (Tree Mark Open )
    =======================================================
    PAGE_ID-------------SUBPAGE_ID-------VIEW-------------------MODIFY-------------------CREATE----------------------------TABLE COLUMN NAME
    ========================================================          
    Administration-----------A------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------B------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------C------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------D------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Administration-----------E------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    - (Tree Mark Open )
    Module 2 Tree Open in Tabular Form like
    Attendance-----------F------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Attendance-----------G------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Attendance-----------H------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Attendance-----------I------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    - (Tree Mark Open )
    Module 3 Tree Open in Tabular Form like
    Accounts-------------J------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------K------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------L------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------M------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------N------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------O------------------CHECK bOX------------CHECK BOX-------------CHECK BOX
    Accounts-------------P------------------CHECK bOX------------CHECK BOX-------------CHECK BOXi need divided these three Module in Tabular form in three region as tree.
    Table APPLICATION_PAGE_DETAILS
    ID                   NUMBER
    PAGE_ID             NUMBER
    SUB_PAGE_ID          NUMBER
    ========================
    TABLE USER_RIGHT
    ======================
    ID                  NUMBER
    EMP_ID            NUMBER
    PAGE_ID            NUMBER
    SUB_PAGE_ID        NUMBER
    VIEW                    VARCHAR2(1)
    MODIFY                VARCHAR2(1)
    CREATE                VARCHAR2(1)How to create multiple Tree Type Region In Tabular Form ?
    How can i do this ?
    Thanks
    Edited by: Vedant on Oct 4, 2011 3:21 AM
    Edited by: Vedant on Oct 4, 2011 9:09 PM
    Edited by: Vedant on Oct 13, 2011 8:57 PM

    Well think of it I believe the scenario is too bird viewed hence the solution can't be exact.
    But thinking of a possible solution every time a child operation fails have a catch block where you you go back to system if the parent needs to be deleted if yes, call Delete Method on the parent.
    Note: Make sure that the decision on whether or not the parent record needs to be deleted will depends on the question "Does Parent Record already has several other children associated to it or not"
    Hope this clarifies.
    Regards,
    Messer

  • How to create an internal table with a types structure?

    Hi experts,
    I've 3 internal tables with the same structure, I think I could put a type structure and put that type inside the body of the internal data, is this possible? If true, how can I put that?
    Example:
    TYPES: Begin of type_s,
                   pernr like pa0001-pernr,
                 end of type_s.
    Data: begin of itab_1 occurs 0,
    ¿¿¿??? reference to type_s
             end of itab_1.
    Thanks a lot,
    Regards,
    Rebeca

    Hi,
    Use like this..
    DATA: Begin of type_s,
    pernr like pa0001-pernr,
    end of type_s.
    DATA: BEGIN OF ITAB_1 OCCURS 0.
    INCLUDE STRUCTURE type_s.
    DATA: END OF ITAB_1.
    Otherwise like this.
    types: Begin of type_s,
    pernr like pa0001-pernr,
    end of type_s.
    Data: itab_1 type standard table of type_s.
    Note: You have to create work area explicitly.
    Like this
    data wa like itab1.
    Edited by: Velangini Showry Maria Kumar Bandanadham on May 26, 2009 1:04 PM

  • How to use Types structure in smartform layout

    Hi Experts,
    i have a requirement in smartforms. i have a z-structure having some fields. those fields
    should be in the smartform output when we run the print program. This is working fine.
    But i need to add 2 more fields to the existing z-structure. For this, i created a types
    structure in the print program and added the 2 new fields and created internal tables from
    that structure.
    My question is how to pass this types strucure to the smartform layout. i tried to add the
    structure in the tables option of the form interface.
    I get the error "Form Interface - Only table types may be used as the reference type for a table parameter".
    i also tried to declare the types structure. Please advise.

    Hi,
    you create structure in se11 and select structure radio button.
    In the smart form give like as
    Form interface---->tables (tab)
    parameter name ---I_FINAL(inernal table)
    type assignment---LIKE
    Associated type---ZXXXXX (structure name) 
    For declarations of workarea:
    Global definitons----->Global data
    Variable name----WA_FINAL
    Type assignment---TYPE
    Associated type---ZXXXXX
    you declared as of above
    I hope it will helpful you
    Regards
    Bhupal

  • Urgent : how I get tree type group total result

    hi master
    sir now system give me this type for result
    PARENT ACCID DRBAL CRBAL
    K1
    K11
    11 K1101 46291132
    11 K1102 13182173
    11 K1103 23784045
    11 K1104
    11 K1105
    11 K1106
    11 K1107 10001795
    11 K1108 9083529
    11 K1109
    11 K1110 4224350
    11 K1111
    11 K1112 6696832
    11 K1113 7963381
    11 K1114 742766
    1 K12
    12 K1201 1486082
    12 K1202
    12 K1203
    1 K13
    13 K1301
    1301 K130101
    1301 K130102
    1301 K130103
    1301 K130104 1977616
    1301 K130105
    1301 K130106 736266
    1301 K130107 396673
    1301 K130108 42751
    1301 K130109 298362
    1301 K130110 187696
    1301 K130111 537
    1301 K130112 942
    1301 K130113 987
    1301 K130114 1272
    1301 K130115 40000
    13 K1302
    1302 K130201
    1302 K130202
    1302 K130203
    1302 K130204
    1302 K130205 259941
    13 K1303
    1303 K130301
    1303 K130302
    1303 K130303 177716
    13 K1304
    1304 K130401
    1304 K130402
    1304 K130403
    1304 K130404
    1304 K130405
    1304 K130406 809719
    1304 K130407
    1304 K130408 1786091
    13 K1305
    1305 K130501
    1305 K130502
    13 K1306
    1306 K130601
    13 K1311
    1311 K131101 788780
    K2
    2 K21
    21 K2101
    2101 K210101
    2101 K210104
    21 K2102
    2102 K210201
    2102 K210202
    22 K2205
    2205 K220501
    2205 K220502
    220502 K22050201
    220502 K22050202
    220502 K22050203
    220502 K22050204
    22 K2206
    2206 K220601
    2206 K220602
    but sir i need this type of result
    PARENT ACCID DRBAL CRBAL
    GROUP NAME K1
    GROUP NAME K11
    11 K1101 46291132
    11 K1102 13182173
    11 K1103 23784045
    11 K1104
    11 K1105
    11 K1106
    11 K1107 10001795
    11 K1108 9083529
    11 K1109
    11 K1110 4224350
    11 K1111
    11 K1112 6696832
    11 K1113 7963381
    11 K1114 742766
    TOTAL
    1 K12
    TOTAL
    GROUP NAME
    12 K1201 1486082
    12 K1202
    12 K1203
    TOTAL
    1 K13
    13 K1301
    1301 K130101
    1301 K130102
    1301 K130103
    1301 K130104 1977616
    1301 K130105
    1301 K130106 736266
    1301 K130107 396673
    1301 K130108 42751
    1301 K130109 298362
    1301 K130110 187696
    1301 K130111 537
    1301 K130112 942
    1301 K130113 987
    1301 K130114 1272
    1301 K130115 40000
    13 K1302
    1302 K130201
    1302 K130202
    1302 K130203
    1302 K130204
    1302 K130205 259941
    13 K1303
    1303 K130301
    1303 K130302
    1303 K130303 177716
    13 K1304
    1304 K130401
    1304 K130402
    1304 K130403
    1304 K130404
    1304 K130405
    1304 K130406 809719
    1304 K130407
    1304 K130408 1786091
    13 K1305
    1305 K130501
    1305 K130502
    13 K1306
    Sir I need total group by group father group total and child group total
    Please help me how I get tree type group total result

    Hi master
    thankyou for your reply
    Sir,
    i know and you see my working i get code form master table and get detal amount form other table
    I have two table see table
    Acctab               Baltab
    PARENT           PCID
    CHILD           title
    PCID           amount
    I need heretical result use this type of query but not success
    please see my query and give me idea how I get here full tree
    select test.child,test.pcid,baltab.pcid from (select acctab.child,acctab.parent,acctab.pcid
    from acctab
    start with acctab.parent is null
    connect by prior acctab.child= acctab.parent) test,baltab
    where test.pcid=baltab.pcid ;
    CHILD PCID PCID
    1 1 1
    2 2 2
    3 3 3
    11 111 111
    12 112 112
    13 113 113
    21 221 221
    22 222 222
    23 223 223
    31 331 331
    32 332 332
    33 333 333
    but I need this type result
    CHILD PCID
    1 1
    11 111
    12 112
    13 113
    2 2
    21 221
    22 222
    23 223
    3 3
    31 331
    32 332
    33 333

  • Identifying all the types that implements a particular type using roslyn syntax tree.

    I have a method that takes the syntax tree of a .cs file as an argument.This method has to find all the types that inherits or implements a  particular type e.g. finds occurrences of all instances of statements "SqlConn
    c = new SqlConn()" because it implements IDisposable. I am using Roslyn API.

    I had a system recently containing seven sequence files, approx 20 subsequences in each, and around 10-20 steps in each sub-sequence. Every step (except for the NI non-code module types) was an instance of a step type.
    Each one of these steps had an Edit sub-step and a code module called through the code module adapter.
    In order to make these into "wrapped up" step types it was decided to move the code module to a Post-Step substep (as also done in the NI-IVI step types) - so that developers cannot fiddle with the code prototype or module.
    In order to do this I had to open all 7 of the sequence files, make the changes and then ensure that "Apply changes in this dialog to a loaded instances" was checked. This seems to sort of work, but some steps started causing Error 17502 (System Error) when you configure them (call the Edit substep). Over the course of the past few months I have had to effectively check every instance of a type to see if it works (deleting the step and replacing it when it doesnt). Other strange things happened like some of the step type instances now have the "None" (adapter) icon associated with them - but both still work.
    The idea of creating a type-def of a step type is a good one, but frustrating that it doesnt seem to fully work. Why should the sequence file also store a version of the step-type - which is what is effectively causing this problem - why not make it so that if you dont have the step types installed in the type palette - TOUGH! Message Edited by RichM on 03-15-2005 06:55 AM

  • How to display KMcontent in a tree view structure

    Hi,
    I want to dispaly KM content in a Tree view manner like sdn. My exact requirement is - I have a folder in KM Content along with subfolders. Now I want to display all this content in a Detailed Navigation area like a tree view structure. I invite best solutions.
    Thanks in advance
    dEvara

    There is one way possible.
    1) Create a KM Navigation iview for the repository/folder using the Tree View layout.
    2) Set the <b>Initial State of Navigation Panel</b> property in the iview to <u><i>Always Close</i></u>
    This would give make the iview take the entire area combining Content Area & Third level Navigation for rendering content.
    This would give the illusion that the third level navigation is your tree.
    Hope this helps.
    Pradeep.

  • PR00 : How to implement this condition type ?

    Hi,
    Please can you give me the steps to implement a Condition Type (condition that we use in Tcode VK11)
    Example of  condition : PR00 (price)
    Please help.
    Regards.

    Transaction Code: VK11 is to maintain Condition Records. Condition record can be maintained for all condition type, except Header and manual condition types.
    Write-up on Pricing procedure configuration:
    Determination of Pricing Procedure:
    In SD, Pricing Procedure is determined (T.Code: OVKK) based on Sales Area (Sales Organization + Distribution Centre + Division) + Customer Pricing Procedure + Document Pricing Procedure. Sales Area is determined in Sales Order Header Level. Customer Pricing Procedure is determined from Customer Master. Document Pricing Procedure is determined from Sales Document Type / Billing Type (if configured). Once the pricing procedure is determined, Condition records are fetched. If appropriate condition records are found, the price is determined. If Mandatory pricing condition is missing, system will through an error message.
    Configuration of Pricing Procedure:
    In SD, the steps to configure Pricing procedure are as under:
    Step 1:
    Condition table (T.Code: V/04): If existing condition table meets the requirement, we need not create a new condition table. Considering the requirement for new condition table, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Condition Table (select the required fields combination, which will store condition record).
    Step 2:
    Access Sequence (T.Code: V/07): If existing access sequence meets the requirement, we need not create a new access sequence. Considering the requirement for new sequence, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Access Sequence (Access sequence is made up of Accesses (Tables) & the order of priority in which it is to be accessed. Here we assign the condition table to access sequence.
    Step 3:
    Condition Type (T.Code: V/06): If existing condition type meets the requirement, we need not create a new condition type. Considering the requirement for new condition type, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Condition Type. It is always recommended to copy an existing similar condition type & make the neccessary changes. Here we assign Access sequence to Condition type.
    Step 4:
    a. Pricing Procedure (T.Code: V/08):  It is recommended to copy a similar pricing procedure & make the neccesary changes in new pricing procedure. Pricing Procedure is a set of condition type & arranged in the sequence in which it has to perform the calculation. Considering the requirement for new Pricing Procedure, the configuration will be done in spro as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Pricing Procedure --> Maintain Pricing Procedure.
    b. Pricing Procedure (T.Code: VOK0): After maintaining the pricing procedure the next step will be determination of pricing procedure. Configuration for determining pricing procedure in SPRO is as follows: IMG --> Sales & Distribution --> Basic Function --> Pricing Control --> Pricing Procedure --> Determine Pricing Procedure.
    5. Condition record (T.Code: VK11 / VK12): Condition record is a master data, which is required to be maintained by Core team / person responsible from the client. During new implementation, the condition records can be uploaded using tools like SCAT, LSMW, etc. Condition Record is maintained in T.Code: VK11 / VK12, which are captured in Sales Order & Billing.
    Also check document pricing procedure in Sales Document Type (T.Code: VOV8 - Sales order Type, VOFA: Billing Type (If Required)), customer pricing procedure in Customer Master Data (T.Code: XD02), ... are in place.
    Regards,
    Rajesh Banka

  • Tree   Data  Structure

    Hello Guys,
    I am stuck in my project for a while and decided to contact you guys for ideas because am short of ideas how to get it done. This is the task: I have information like this from the server and have to create a tree structure from the information(data). The data from the server comes in this form:
    APP               net       main
    Account        net      main
    Address        net      main
    Person        net      OptelClient3
    Person        net      ggggg
    Person        net      show
    Bindings    apple    parse
    Bindings    apple    findProject
    Bindings    apple    show
    The positions of the columns is not fixed. The first column can become the second or the third depending on the preference of the user.
    1)
    The task is this:
    In each row , the first data must be the parent of the second data, the second data must be the parent of the third data and if there appears to be a fourth data then it will be the child of the third and it follows like that......
    I have to be able to build this tree structure whiles am looping over the information from the server.
    *****Optional Requirement****
    And if it is possible i must also be able to use the structure to create a table.
    I have spent much time(weeks after weeks) doing it but its not working so am asking if someone can help me with ideas how to get this done or point me to a tutorial where i can have a deep understanding of how i can do it.
    Thank for your help.

    Thanks for your reply.
    I have to implement the tree from the list i receive from the server. Each column belongs to the same class. For instance the first column will belong to a class called say "cHuman" and i will set the name attribute of each class to the names of the first column.
    The second coulumn will belong to the same class say "cPackage"and i will set each to the names of the second column datas. This apply to the rest of the columns.
    What am asking is simple. How can i build the tree dynamically so that the in each row, every data is parent to the next data. That is all what i want. What am doing is correct but i just need how to create the tree dynamically. Show me how to build trees dynamically from data.
    Thanks.

  • Tree like structure ??????????? pls help

    Hello
    I want to get the tree like structure
    My requirement is that when I write any jsp and put it in webapps's any
    folder I should get tree like structure of the folders in which I am putting my jsp.
    Foe example I have structure like
    webapps
    --rakesh_folder1
    --rakesh_folder2
    --rakesh_folder3
    ---rakesh_subfolder1
    ---rakesh_subfolder2
    ----(Here goes my jsp which would make to get sructure)
    ----my_other_file_1
    ----my_other_file_2
    When I type http://localhost:8080/rakesh_folder3/rakesh_subfolder2/jspname
    I want output as
    --rakesh_folder3
    ---rakesh_subfolder2
    ----my_other_file_1 (size of file) (time stamp)
    ----my_other_file_2 (size of file) (time stamp)
    How should I proceed ????????????????????
    Tx in advance
    Rakesh

    rakesh,
    see if you have tree structure like this
    C:\
    Vivek
    Rakesh
    then C:\ is the root from where you are starting.
    so just
    <html>
    <body>
    C:\
    &ampnbsp;&ampnbsp;&ampnbsp;Vivek
    &ampnbsp;&ampnbsp;&ampnbsp;Rakesh
    </body>
    </html>

  • What Tree Data Structures does Java Include?

    Hello,
    I have been reading about several tree data structures like a binary search tree, self-balancing bst, minimum spanning tree, red-black tree, AVL tree, etc... Are there data structures in Java represent the various trees, or is implementation of the ds left to user?
    Eric

    "Java" can be termed the "Java Language". The language does not have trees.
    In more general usage "Java" can refer to a standard, desktop, delivered VM which includes the standard Java API. The types that you are asking about would be found in the following package.
    [http://java.sun.com/javase/6/docs/api/java/util/package-summary.html]
    "Java" could also refer to any other commonly available implementations. In that case probably anything that can be implemented has been implemented somewhere. Googling works.

  • Sorting columns of Tree table structure

    Hi ,
    We have developed Tree Table structure based on the tutorial, but the data in the columns are not in the right order. Can anyone tell me how to do column sorting for Tree table structure, I know how to do column sorting on normal table structure but that logic does not work for Tree table structures
    Appreciate your help
    Som

    Hi Som,
    If you are using TutWD_TreeByNestingTableColumn project as example, this code can help you:
      //@@begin javadoc:onActionSortTree(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionSortTree(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSortTree(ServerEvent)
         sort(wdContext.nodeCatalogEntries());
        //@@end
      private void sort(IPrivateTreeTableView.ICatalogEntriesNode catalogEntriesNode) {
           if(null==catalogEntriesNode) return;
         catalogEntriesNode.sortElements(COMPORATOR);
         int size = catalogEntriesNode.size();
         for(int i=0;i<size;i++) {
              sort( catalogEntriesNode.nodeChildCatalogEntries(i) );
      private static final Comparator COMPORATOR = new CatalogEntriesComparator();
      private static class CatalogEntriesComparator implements Comparator {
         public int compare(Object o1, Object o2) {
              IPrivateTreeTableView.ICatalogEntriesElement ot1 = (IPrivateTreeTableView.ICatalogEntriesElement)o1;
              IPrivateTreeTableView.ICatalogEntriesElement ot2 = (IPrivateTreeTableView.ICatalogEntriesElement)o2;
              return Collator.getInstance().compare(     ot1!=null ? ot1.getTITLE() : "",
                                                      ot2!=null ? ot2.getTITLE() : "");
         public boolean equals(Object obj) {
              return false;
    Best regards, Maksim Rashchynski.

Maybe you are looking for

  • First day of the week

    Hi experts I have a field (parameter) in the selection screen as a date type. When the user selects any date, i should be able to get the first day (MONDAY) of that particular week. How do you think this can be acheived in normal abap report program

  • Root.sh script at the end of installation of Oracle Clusteware software

    When i run the root.sh script at the end of installation of Oracle Clusteware software i receive the following message:. Any ideas on how to fix this? ==================================================================== *[root@rac1 cdata]# /ora_dba/c

  • Can I use a Solid state drive in my 21 inch iMac

    Can I use a Solid state drive in my 21 inch iMac if so what manufaturer is recommended?

  • How to create a page break in application designer

    Hi Folks, I need to create a simple page break in a PeopleSoft online page for the purpose controlling how the page prints. To achieve this, I'm using an HTML area in app designer with the following page break code: <p style="page-break-after:always;

  • HP 5520 NOT PRINTING

    My relatively new HP 5520 is not printing. I have replaced the ink which were getting low but did not neccassarily need to be changed and still no joy. A test page will print but not any documents ! Have tried everything reinstalling etc etc when i g