OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 83 | Rev 156 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 83 Rev 94
Line 113... Line 113...
113
 
113
 
114
    public boolean contains(final String id) {
114
    public boolean contains(final String id) {
115
        return getDescFromID(id) != null;
115
        return getDescFromID(id) != null;
116
    }
116
    }
117
 
117
 
-
 
118
    public final Collection<Group> getDescendantGroups() {
-
 
119
        final List<Group> res = new ArrayList<Group>();
-
 
120
        this.getDescendantGroups(res);
-
 
121
        return res;
-
 
122
    }
-
 
123
 
-
 
124
    protected void getDescendantGroups(final Collection<Group> res) {
-
 
125
        for (final Tuple2<Item, Integer> t : this.list) {
-
 
126
            if (t.get0() instanceof Group) {
-
 
127
                Group g = (Group) t.get0();
-
 
128
                res.add(g);
-
 
129
                g.getDescendantGroups(res);
-
 
130
            }
-
 
131
        }
-
 
132
    }
-
 
133
 
118
    @Override
134
    @Override
119
    public final Collection<Item> getDescendantItems() {
135
    public final Collection<Item> getDescendantItems() {
120
        final List<Item> res = new ArrayList<Item>();
136
        final List<Item> res = new ArrayList<Item>();
121
        this.getDescendantItems(res);
137
        this.getDescendantItems(res);
122
        return res;
138
        return res;