1 28 29 package org.jibx.binding.model; 30 31 import java.util.ArrayList ; 32 import java.util.Collection ; 33 34 41 42 public class EmptyList extends ArrayList 43 { 44 public static final EmptyList INSTANCE = new EmptyList(); 45 46 private EmptyList() {} 47 48 51 public void add(int index, Object element) { 52 throw new UnsupportedOperationException ("List is not modifiable"); 53 } 54 55 58 public boolean add(Object o) { 59 throw new UnsupportedOperationException ("List is not modifiable"); 60 } 61 62 65 public boolean addAll(Collection c) { 66 throw new UnsupportedOperationException ("List is not modifiable"); 67 } 68 69 72 public boolean addAll(int index, Collection c) { 73 throw new UnsupportedOperationException ("List is not modifiable"); 74 } 75 76 79 public void ensureCapacity(int minCapacity) { 80 throw new UnsupportedOperationException ("List is not modifiable"); 81 } 82 } | Popular Tags |