1 25 43 package org.jgrapht.graph; 44 45 import java.io.*; 46 47 import java.util.*; 48 49 import org.jgrapht.*; 50 51 52 67 public class UnmodifiableGraph<V, E> 68 extends GraphDelegator<V, E> 69 implements Serializable 70 { 71 72 74 private static final long serialVersionUID = 3544957670722713913L; 75 private static final String UNMODIFIABLE = "this graph is unmodifiable"; 76 77 79 85 public UnmodifiableGraph(Graph<V, E> g) 86 { 87 super(g); 88 } 89 90 92 95 public E addEdge(V sourceVertex, V targetVertex) 96 { 97 throw new UnsupportedOperationException (UNMODIFIABLE); 98 } 99 100 103 public boolean addEdge(V sourceVertex, V targetVertex, E e) 104 { 105 throw new UnsupportedOperationException (UNMODIFIABLE); 106 } 107 108 111 public boolean addVertex(V v) 112 { 113 throw new UnsupportedOperationException (UNMODIFIABLE); 114 } 115 116 119 public boolean removeAllEdges(Collection<? extends E> edges) 120 { 121 throw new UnsupportedOperationException (UNMODIFIABLE); 122 } 123 124 127 public Set<E> removeAllEdges(V sourceVertex, V targetVertex) 128 { 129 throw new UnsupportedOperationException (UNMODIFIABLE); 130 } 131 132 135 public boolean removeAllVertices(Collection<? extends V> vertices) 136 { 137 throw new UnsupportedOperationException (UNMODIFIABLE); 138 } 139 140 143 public boolean removeEdge(E e) 144 { 145 throw new UnsupportedOperationException (UNMODIFIABLE); 146 } 147 148 151 public E removeEdge(V sourceVertex, V targetVertex) 152 { 153 throw new UnsupportedOperationException (UNMODIFIABLE); 154 } 155 156 159 public boolean removeVertex(V v) 160 { 161 throw new UnsupportedOperationException (UNMODIFIABLE); 162 } 163 } 164 | Popular Tags |