package com.sourcefellows.patterns.composite;

public class SimpleComponent implements Component {

    private final String name;
    private final Weight weight;

    public SimpleComponent(String name, Weight weight) {
        this.name = name;
        this.weight = weight;
    }

    @Override
    public Weight getWeight() {
        return weight;
    }

    public String getName() {
        return name;
    }
}
