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

cdc.mf.checks.nodes.enumerations.DefaultEnumerationsChecker Maven / Gradle / Ivy

The newest version!
package cdc.mf.checks.nodes.enumerations;

import java.util.List;

import cdc.issues.checks.AbstractPartsChecker;
import cdc.issues.checks.SnapshotManager;
import cdc.issues.locations.LocatedObject;
import cdc.mf.model.MfEnumeration;
import cdc.mf.model.MfQNameItem;
import cdc.mf.model.MfTypeOwner;

public class DefaultEnumerationsChecker extends AbstractPartsChecker {
    public static final String KEY = "DefaultEnumerationsChecker";

    public DefaultEnumerationsChecker(SnapshotManager manager) {
        super(manager,
              MfTypeOwner.class,
              MfEnumeration.class,
              new DefaultEnumerationChecker(manager));
        manager.register(KEY, this);
    }

    @Override
    protected List> getParts(MfTypeOwner object) {
        final List delegates = object.getEnumerations()
                                                    .stream()
                                                    .sorted(MfQNameItem.QNAME_COMPARATOR)
                                                    .toList();
        return LocatedObject.locate(delegates);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy