1 7 8 package javax.management; 9 10 11 import java.util.ArrayList ; 13 14 15 25 public class AttributeList extends ArrayList { 26 27 28 29 private static final long serialVersionUID = -4077085769279709076L; 30 31 34 public AttributeList() { 35 super(); 36 } 37 38 45 public AttributeList(int initialCapacity) { 46 super(initialCapacity); 47 } 48 49 60 public AttributeList(AttributeList list) { 61 super(list); 62 } 63 64 65 70 public void add(Attribute object) { 71 super.add(object); 72 } 73 74 85 public void add(int index, Attribute object) { 86 try { 87 super.add(index, object); 88 } 89 catch (IndexOutOfBoundsException e) { 90 throw (new RuntimeOperationsException (e, "The specified index is out of range")); 91 } 92 } 93 94 103 public void set(int index, Attribute object) { 104 try { 105 super.set(index, object); 106 } 107 catch (IndexOutOfBoundsException e) { 108 throw (new RuntimeOperationsException (e, "The specified index is out of range")); 109 } 110 } 111 112 123 public boolean addAll(AttributeList list) { 124 return (super.addAll(list)); 125 } 126 127 141 public boolean addAll(int index, AttributeList list) { 142 try { 143 return(super.addAll(index, list)); 144 } 145 catch (IndexOutOfBoundsException e) { 146 throw (new RuntimeOperationsException (e, "The specified index is out of range")); 147 } 148 } 149 150 } 151 | Popular Tags |