1 28 29 package org.objectweb.openccm.Containers.MetaInformation; 30 31 import org.objectweb.ccm.util.Table; 32 import org.omg.CORBA.LocalObject ; 33 34 35 38 public class OperationTypeListImpl 39 extends LocalObject 40 implements OperationTypeList 41 { 42 private Table _operations; 43 44 public OperationTypeListImpl() 45 { 46 _operations = new Table(); 47 } 48 49 public OperationType[] get_all_operation_types() 50 { 51 OperationType[] result = new OperationType[_operations.size()]; 52 53 int idx = 0; 55 for(java.util.Enumeration elements = _operations.elements(); elements.hasMoreElements(); ) 56 { 57 OperationType info = (OperationType)elements.nextElement(); 58 result[idx++] = info; 59 } 60 return result; 61 } 62 63 public OperationType[] get_named_operation_types(String [] names) 64 { 65 OperationType[] result = new OperationType[names.length]; 66 67 int i = 0; 69 for(i=0;i<names.length;i++) 70 { 71 result[i] = (OperationType)_operations.get(names[i]); 72 } 73 return result; 74 } 75 76 public OperationType get_operation_type(String name) 77 { 78 return (OperationType) _operations.get(name); 79 } 80 81 public void add_operation_type(OperationType _opt) 82 { 83 _operations.put(_opt.name(),_opt); 84 } 85 86 public void remove_operation_type(String name) 87 { 88 _operations.remove(name); 89 } 90 } 91 | Popular Tags |