|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.weblab_project.core.util.ComposedUnitUtil
public class ComposedUnitUtil
A class providing useful method for crawling a ComposedUnit
.
Method Summary | ||
---|---|---|
static
|
getSelectedSubMediaUnits(ComposedUnit cu,
java.lang.Class<T> mediaUnitClass)
The same as ComposedUnitUtil.getSubMediaUnits(ComposedUnit, boolean) , but with a filter on the MediaUnit class to be retrieved
by the List . |
|
static java.util.List<MediaUnit> |
getSubMediaUnits(ComposedUnit cu)
Same as ComposedUnitUtil.getSubMediaUnits(cu, false) |
|
static java.util.List<MediaUnit> |
getSubMediaUnits(ComposedUnit cu,
boolean otherComposedIncluded)
Crawl the MediaUnit tree to get all inner MediaUnit s that compose this ComposedUnit . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.List<MediaUnit> getSubMediaUnits(ComposedUnit cu)
ComposedUnitUtil.getSubMediaUnits(cu, false)
cu
- The ComposedUnit
to retrieve children
MediaUnit
List
without ComposedUnit
getSubMediaUnits(ComposedUnit, boolean)
public static java.util.List<MediaUnit> getSubMediaUnits(ComposedUnit cu, boolean otherComposedIncluded)
MediaUnit
tree to get all inner MediaUnit
s that compose this ComposedUnit
. It will seek for
ComposedUnit
s and theirs children and then children of the children... until it reaches all leafs. MediaUnit
will NOT be added to the result List
.
cu
- The ComposedUnit
to retrieve childrenotherComposedIncluded
- Whether or not to included contained ComposedUnit
s in the returned List
. Use false
to retrieve only
leaf children.
MediaUnit
List
public static <T extends MediaUnit> java.util.List<T> getSelectedSubMediaUnits(ComposedUnit cu, java.lang.Class<T> mediaUnitClass)
ComposedUnitUtil.getSubMediaUnits(ComposedUnit, boolean)
, but with a filter on the MediaUnit
class to be retrieved
by the List
. I.e. the only added MediaUnit
are those that are instances of mediaUnitClass
.
T
- Subclass of MediaUnit to be retrievedcu
- The ComposedUnit
to retrieve childrenmediaUnitClass
- The Class
of the only children you need in result List
List
getSubMediaUnits(ComposedUnit, boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |