001    package aima.logic.fol.inference.proof;
002    
003    import java.util.ArrayList;
004    import java.util.Collections;
005    import java.util.List;
006    
007    import aima.logic.fol.kb.data.Chain;
008    
009    /**
010     * @author Ciaran O'Reilly
011     * 
012     */
013    public class ProofStepChainDropped extends AbstractProofStep {
014            private List<ProofStep> predecessors = new ArrayList<ProofStep>();
015            private Chain dropped = null;
016            private Chain droppedOff = null;
017    
018            public ProofStepChainDropped(Chain dropped, Chain droppedOff) {
019                    this.dropped = dropped;
020                    this.droppedOff = droppedOff;
021                    this.predecessors.add(droppedOff.getProofStep());
022            }
023    
024            //
025            // START-ProofStep
026            public List<ProofStep> getPredecessorSteps() {
027                    return Collections.unmodifiableList(predecessors);
028            }
029    
030            public String getProof() {
031                    return dropped.toString();
032            }
033    
034            public String getJustification() {
035                    return "Dropped: " + droppedOff.getProofStep().getStepNumber();
036            }
037            // END-ProofStep
038            //
039    }