1 28 29 30 package org.objectweb.ccm.runtime; 31 32 import org.objectweb.corba.runtime.*; 33 34 37 public class SinkSet 38 implements java.io.Serializable 39 { 40 static final private String _class_name = "SinkSet"; 42 private Sink[] _elements; 43 44 public 46 SinkSet() 47 { 48 _elements = new Sink[0]; 50 } 51 52 public 54 SinkSet(Sink[] sinks) 55 { 56 _elements = sinks; 58 } 59 60 64 final public Sink 65 get(String name) 66 throws org.omg.Components.InvalidName 67 { 68 Sink[] sinks = _elements; 69 for (int i=0;i<sinks.length;i++) { 70 if (sinks[i].name.equals(name)) { 71 return sinks[i]; 72 } 73 } 74 75 throw new org.omg.Components.InvalidName(); 76 } 77 78 final public Sink 79 uncheckedGet(String name) 80 { 81 Sink[] sinks = _elements; 82 for (int i=0;i<sinks.length;i++) { 83 if (sinks[i].name.equals(name)) { 84 return sinks[i]; 85 } 86 } 87 88 return null; 90 } 91 } 92 | Popular Tags |