001/*
002 * To change this template, choose Tools | Templates
003 * and open the template in the editor.
004 */
005package org.anarres.qemu.exec.host.chardev;
006
007import java.util.HashMap;
008import java.util.Map;
009import javax.annotation.Nonnull;
010
011/**
012 *
013 * @author shevek
014 */
015public abstract class AbstractCharDevice implements CharDevice {
016
017    private final String name;
018
019    public AbstractCharDevice(String name) {
020        this.name = name;
021    }
022
023    @Override
024    public String getName() {
025        return name;
026    }
027
028    protected void addProperties(@Nonnull Map<String, Object> m) {
029    }
030
031    @Override
032    public Map<? extends String, ? extends Object> getProperties() {
033        Map<String, Object> m = new HashMap<String, Object>();
034        addProperties(m);
035        return m;
036    }
037}