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