Package com.jcloisterzone.feature.visitor

Source Code of com.jcloisterzone.feature.visitor.IsCompleted

package com.jcloisterzone.feature.visitor;

import com.jcloisterzone.feature.Completable;
import com.jcloisterzone.feature.Feature;

public class IsCompleted implements FeatureVisitor<Boolean> {

    private boolean isCompleted = true;

    @Override
    public boolean visit(Feature feature) {
        Completable completable = (Completable) feature;
        if (completable.isOpen()) {
            isCompleted = false;
            return false;
        }
        return true;
    }

    @Override
    public Boolean getResult() {
        return isCompleted;
    }

}
TOP

Related Classes of com.jcloisterzone.feature.visitor.IsCompleted

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.