MCPcopy Index your code
hub / github.com/JHUAPL/CodeCut / EmptyGraphCutData

Class EmptyGraphCutData

codecut-gui/src/main/java/graphcut/EmptyGraphCutData.java:42–88  ·  view source on GitHub ↗

empty data used to avoid null checks

Source from the content-addressed store, hash-verified

40 * empty data used to avoid null checks
41 */
42public class EmptyGraphCutData implements GraphCutData {
43
44 @Override
45 public Namespace getNamespace() {
46 throw new UnsupportedOperationException("Empty data has no namespace");
47 }
48
49 @Override
50 public boolean isNamespace(Namespace ns) {
51 return false;
52 }
53
54 @Override
55 public GraphCutGraph getGraph() {
56 throw new UnsupportedOperationException("Empty data has no graph");
57 }
58
59 @Override
60 public NamespaceEdgeCache getNamespaceEdgeCache() {
61 throw new UnsupportedOperationException("Empty data has no namespace edge cache");
62 }
63
64 @Override
65 public boolean hasResults() {
66 return false;
67 }
68
69 @Override
70 public void dispose() {
71 //nothing
72 }
73
74 @Override
75 public boolean isInitialized() {
76 return false;
77 }
78
79 @Override
80 public GraphPerspectiveInfo<GraphCutVertex, GraphCutEdge> getGraphPerspective(){
81 throw new UnsupportedOperationException("Empty data does not need view information");
82 }
83
84 @Override
85 public void setGraphPerspective(GraphPerspectiveInfo<GraphCutVertex, GraphCutEdge> info) {
86 throw new UnsupportedOperationException("Empty data does not need view information");
87 }
88}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected