1 28 package de.nava.informa.utils.manager.memory; 29 30 import de.nava.informa.core.ChannelGroupIF; 31 32 import java.net.URL ; 33 import java.util.ArrayList ; 34 import java.util.List ; 35 36 41 public class Channel extends de.nava.informa.impl.basic.Channel { 42 private List groups = new ArrayList (); 43 44 51 public Channel(long id, String title, URL location) { 52 super(title); 53 setId(id); 54 setLocation(location); 55 } 56 57 62 public final void addParentGroup(ChannelGroupIF group) { 63 synchronized (group) { 64 if (!groups.contains(group)) { 65 groups.add(group); 66 } 67 } 68 } 69 70 75 public final void removeParentGroup(ChannelGroupIF group) { 76 synchronized (group) { 77 groups.remove(group); 78 } 79 } 80 81 86 public final ChannelGroupIF[] getParentGroups() { 87 return (ChannelGroupIF[]) groups.toArray(new ChannelGroupIF[0]); 88 } 89 } 90 | Popular Tags |