001package net.automatalib.graphs.dot;
002
003import java.io.IOException;
004import java.util.Map;
005
006import net.automatalib.commons.util.mappings.Mapping;
007
008public class DelegateDOTHelper<N, E> implements GraphDOTHelper<N, E> {
009
010        private final GraphDOTHelper<N,? super E> parent;
011        
012        protected DelegateDOTHelper(GraphDOTHelper<N,? super E> parent) {
013                this.parent = parent;
014        }
015
016        @Override
017        public void writePreamble(Appendable a) throws IOException {
018                parent.writePreamble(a);
019        }
020
021        @Override
022        public void writePostamble(Mapping<N, String> identifiers, Appendable a)
023                        throws IOException {
024                parent.writePostamble(identifiers, a);
025        }
026
027        @Override
028        public boolean getNodeProperties(N node, Map<String, String> properties) {
029                return parent.getNodeProperties(node, properties);
030        }
031
032        @Override
033        public boolean getEdgeProperties(N src, E edge, N tgt,
034                        Map<String, String> properties) {
035                return parent.getEdgeProperties(src, edge, tgt, properties);
036        }
037}