1 26 package org.objectweb.util.explorer.core.root.lib; 27 28 import java.util.Arrays ; 29 import java.util.Iterator ; 30 import java.util.List ; 31 import java.util.Vector ; 32 33 import org.objectweb.util.explorer.api.Entry; 34 import org.objectweb.util.explorer.api.RootContext; 35 import org.objectweb.util.explorer.api.RootEntry; 36 37 45 public class DefaultRootContext 46 implements RootContext 47 { 48 49 55 protected List elements_ = null; 56 57 63 public DefaultRootContext(){ 64 elements_ = new Vector (); 65 } 66 67 73 protected void addEntry(List l, Entry[] entries){ 74 75 } 76 77 83 86 public RootEntry[] getEntries() { 87 Vector entries = new Vector (); 88 Iterator it = elements_.iterator(); 89 while (it.hasNext()) { 90 RootContext element = (RootContext) it.next(); 91 entries.addAll(Arrays.asList(element.getEntries())); 92 } 93 return (RootEntry[])entries.toArray(new RootEntry[entries.size()]); 94 } 95 96 102 public void addRootContext(RootContext rootContext){ 103 if(rootContext != null){ 104 elements_.add(rootContext); 105 } 106 } 107 108 } 109 110 111 | Popular Tags |