This page (revision-29) was last changed on 17-Dec-2012 18:37 by Jochen Reutelshöfer

This page was created on 17-Dec-2012 17:06 by Jochen Reutelshöfer

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
29 17-Dec-2012 18:37 4 KB Jochen Reutelshöfer to previous
28 17-Dec-2012 18:35 4 KB Jochen Reutelshöfer to previous | to last
27 17-Dec-2012 18:32 3 KB Jochen Reutelshöfer to previous | to last
26 17-Dec-2012 17:54 3 KB Jochen Reutelshöfer to previous | to last
25 17-Dec-2012 17:53 3 KB Jochen Reutelshöfer to previous | to last
24 17-Dec-2012 17:51 3 KB Jochen Reutelshöfer to previous | to last
23 17-Dec-2012 17:50 2 KB Jochen Reutelshöfer to previous | to last
22 17-Dec-2012 17:49 2 KB Jochen Reutelshöfer to previous | to last
21 17-Dec-2012 17:47 2 KB Jochen Reutelshöfer to previous | to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 12 changed one line
Often it is necessary to find a section of a particular type, which is an ancestor or successor of a given section. Therefore, the following methods can be employed:
Often it is necessary to find a section of a particular type, which is an ancestor or successor of a given section.
For this purpose, multiple static methods in the class Sections are provided starting with ''findAncestor'' or ''findSuccessor'' respectively. If a single section object is returned, it is the first matching section found. If multiple sections are returned, they are ordered as detected by the traversing algorithm. The search for ancestors ascends straight from the given section towards the root section.
The search for successors runs in depth first search manner starting at the given section.
At line 14 removed 7 lines
! Find ancestor
%%prettify
{{{
public static <OT extends Type> Section<OT> findAncestorOfType(Section<?> section, Class<OT> clazz) {
}}}
/%
Returns the the first section, that matches the passed type class, on the path to the root.