package sudoku;

import java.util.Collection;

public abstract class Fact extends NodeSet<Claim,Fact>{
	
    /**
     */
	private static final long serialVersionUID = -3547362110024521237L;

    /**
     * <p>The number ({@value}) of elements (neighbors) of a Rule when the Claim satisfying the Rule
     * has been completely identified.</p>
     */
	public static final int SIZE_WHEN_SOLVED = 1;
	
	public static final int TRUE_CLAIM_COUNT = SIZE_WHEN_SOLVED;
	
    /**
     * <p>The number ({@value}) of elements (neighbors) of a Rule that is a {@code xor}. A Rule is a
     * {@code xor} if it has two Claims, because exactly one of them is true and the other is false.
     * Given that the Rule is satisfied (the Rule is {@code true}), the Claims, as inputs to the
     * Rule, make such a Rule a {@code xor} operation on its neighbors.</p>
     */
	public static final int SIZE_WHEN_XOR = 2;
	
	protected Fact(Puzzle puzzle, Collection<Claim> c, int hash) {
		super(puzzle, hash);
		addAll(c);
	}
	
	@Override
	public boolean equals(Object o){
		if(o instanceof Fact){
			Fact r = (Fact) o;
			return r.puzzle.equals(puzzle) && super.equals(r);
		}
		return false;
	}
	
	public boolean insideVisible(){
		return visible().stream().anyMatch((v) -> v.containsAll(this));
	}
	
	public boolean isSolved(){
		return size() == SIZE_WHEN_SOLVED;
	}
	
	public boolean isXor(){
		return size() == SIZE_WHEN_XOR;
	}
}

@@ -373,529 +373,28 @@
 int 
-SIZE_WHEN_SOLVED = 1;%0A%09%0A%09public static final int TRUE_CLAIM_COUNT = SIZE_WHEN_SOLVED;%0A%09%0A    /**%0A     * %3Cp%3EThe number (%7B@value%7D) of elements (neighbors) of a Rule that is a %7B@code xor%7D. A Rule is a%0A     * %7B@code xor%7D if it has two Claims, because exactly one of them is true and the other is false.%0A     * Given that the Rule is satisfied (the Rule is %7B@code true%7D), the Claims, as inputs to the%0A     * Rule, make such a Rule a %7B@code xor%7D operation on its neighbors.%3C/p%3E%0A     */%0A%09public static final int SIZE_WHEN_XOR = 2
+TRUE_CLAIM_COUNT = 1
 ;%0A%09%0A
@@ -690,222 +690,54 @@
 an i
-nsideVisible()%7B%0A%09%09return visible().stream().anyMatch((v) -%3E v.containsAll(this));%0A%09%7D%0A%09%0A%09public boolean isSolved()%7B%0A%09%09return size() == SIZE_WHEN_SOLVED;%0A%09%7D%0A%09%0A%09public boolean isXor()%7B%0A%09%09return size() == SIZE_WHEN_XOR
+sSolved()%7B%0A%09%09return size() == TRUE_CLAIM_COUNT
 ;%0A%09%7D

remove unused methods, reduce redundancy