All Downloads are FREE. Search and download functionalities are using the official Maven repository.

poussecafe.doc.model.relation.RelationData Maven / Gradle / Ivy

There is a newer version: 0.29.0
Show newest version
package poussecafe.doc.model.relation;

import java.io.Serializable;
import poussecafe.attribute.Attribute;

@SuppressWarnings("serial")
public class RelationData implements Relation.Attributes, Serializable {

    @Override
    public Attribute identifier() {
        return new Attribute() {
            @Override
            public RelationId value() {
                return new RelationId(fromClass, toClass);
            }

            @Override
            public void value(RelationId value) {
                fromClass = value.fromClass();
                toClass = value.toClass();
            }
        };
    }

    private String fromClass;

    private String toClass;

    @Override
    public Attribute fromType() {
        return new Attribute() {
            @Override
            public ComponentType value() {
                return fromType;
            }

            @Override
            public void value(ComponentType value) {
                fromType = value;
            };
        };
    }

    private ComponentType fromType;

    @Override
    public Attribute toType() {
        return new Attribute() {
            @Override
            public ComponentType value() {
                return toType;
            }

            @Override
            public void value(ComponentType value) {
                toType = value;
            };
        };
    }

    private ComponentType toType;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy