// Path: snorocket-core/src/main/java/au/csiro/snorocket/core/model/Datatype.java
// public class Datatype extends AbstractConcept {
//     
//     /**
//      * Serialisation version.
//      */
//     private static final long serialVersionUID = 1L;
//     
//     private int feature;
//     private Operator operator;
//     private AbstractLiteral literal;
// 
//     /**
//          * 
//          */
//     public Datatype(int feature, Operator operator, AbstractLiteral literal) {
//         this.feature = feature;
//         this.operator = operator;
//         this.literal = literal;
//     }
// 
//     public int getFeature() {
//         return feature;
//     }
// 
//     public Operator getOperator() {
//         return operator;
//     }
// 
//     public AbstractLiteral getLiteral() {
//         return literal;
//     }
// 
//     @Override
//     public String toString() {
//         return feature + ".(" + operator + "," + literal + ")";
//     }
// 
//     @Override
//     public int hashCode() {
//         final int prime = 31;
//         int result = 1;
//         result = prime * result + feature;
//         result = prime * result + ((literal == null) ? 0 : literal.hashCode());
//         result = prime * result
//                 + ((operator == null) ? 0 : operator.hashCode());
//         return result;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         if (this == obj)
//             return true;
//         if (obj == null)
//             return false;
//         if (getClass() != obj.getClass())
//             return false;
//         Datatype other = (Datatype) obj;
//         if (feature != other.feature)
//             return false;
//         if (literal == null) {
//             if (other.literal != null)
//                 return false;
//         } else if (!literal.equals(other.literal))
//             return false;
//         if (operator != other.operator)
//             return false;
//         return true;
//     }
// 
//     @Override
//     int compareToWhenHashCodesEqual(AbstractConcept other) {
//         assert hashCode() == other.hashCode();
//         assert other instanceof Datatype;
// 
//         final Datatype otherDatatype = (Datatype) other;
// 
//         final int featureCompare = feature - otherDatatype.feature;
// 
//         if (featureCompare == 0) {
//             final int operatorCompare = operator.compareTo(
//                     otherDatatype.operator);
//             if (operatorCompare == 0) {
//                 return literal.toString().compareTo(otherDatatype.literal.toString());
//             } else {
//                 return operatorCompare;
//             }
//         } else {
//             return featureCompare;
//         }
//     }
// 
// }


import au.csiro.snorocket.core.model.Datatype;

/**
 * Copyright CSIRO Australian e-Health Research Centre (http://aehrc.com).
 * All rights reserved. Use is subject to license terms and conditions. 
 */
package au.csiro.snorocket.core.axioms;


/**
 * Normal form 8. Feature f with operator op and value v subsumes B.
 * 
 * @author Alejandro Metke
 * 
 */
public final class NF8 extends NormalFormGCI {

    /**
     * Serialisation version.
     */
    private static final long serialVersionUID = 1L;
    
    final public Datatype lhsD;
    final public int rhsB;

    /**
	 * 
	 */
    public NF8(Datatype lhsD, int rhsB) {
        this.lhsD = lhsD;
        this.rhsB = rhsB;
    }


// Path: snorocket-core/src/main/java/au/csiro/snorocket/core/model/Datatype.java
// public class Datatype extends AbstractConcept {
//     
//     /**
//      * Serialisation version.
//      */
//     private static final long serialVersionUID = 1L;
//     
//     private int feature;
//     private Operator operator;
//     private AbstractLiteral literal;
// 
//     /**
//          * 
//          */
//     public Datatype(int feature, Operator operator, AbstractLiteral literal) {
//         this.feature = feature;
//         this.operator = operator;
//         this.literal = literal;
//     }
// 
//     public int getFeature() {
//         return feature;
//     }
// 
//     public Operator getOperator() {
//         return operator;
//     }
// 
//     public AbstractLiteral getLiteral() {
//         return literal;
//     }
// 
//     @Override
//     public String toString() {
//         return feature + ".(" + operator + "," + literal + ")";
//     }
// 
//     @Override
//     public int hashCode() {
//         final int prime = 31;
//         int result = 1;
//         result = prime * result + feature;
//         result = prime * result + ((literal == null) ? 0 : literal.hashCode());
//         result = prime * result
//                 + ((operator == null) ? 0 : operator.hashCode());
//         return result;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         if (this == obj)
//             return true;
//         if (obj == null)
//             return false;
//         if (getClass() != obj.getClass())
//             return false;
//         Datatype other = (Datatype) obj;
//         if (feature != other.feature)
//             return false;
//         if (literal == null) {
//             if (other.literal != null)
//                 return false;
//         } else if (!literal.equals(other.literal))
//             return false;
//         if (operator != other.operator)
//             return false;
//         return true;
//     }
// 
//     @Override
//     int compareToWhenHashCodesEqual(AbstractConcept other) {
//         assert hashCode() == other.hashCode();
//         assert other instanceof Datatype;
// 
//         final Datatype otherDatatype = (Datatype) other;
// 
//         final int featureCompare = feature - otherDatatype.feature;
// 
//         if (featureCompare == 0) {
//             final int operatorCompare = operator.compareTo(
//                     otherDatatype.operator);
//             if (operatorCompare == 0) {
//                 return literal.toString().compareTo(otherDatatype.literal.toString());
//             } else {
//                 return operatorCompare;
//             }
//         } else {
//             return featureCompare;
//         }
//     }
// 
// }


// Path: snorocket-core/src/main/java/au/csiro/snorocket/core/axioms/NF8.java
import au.csiro.snorocket.core.model.Datatype;

/**
 * Copyright CSIRO Australian e-Health Research Centre (http://aehrc.com).
 * All rights reserved. Use is subject to license terms and conditions. 
 */
package au.csiro.snorocket.core.axioms;


/**
 * Normal form 8. Feature f with operator op and value v subsumes B.
 * 
 * @author Alejandro Metke
 * 
 */
public final class NF8 extends NormalFormGCI {

    /**
     * Serialisation version.
     */
    private static final long serialVersionUID = 1L;
    
    final public Datatype lhsD;
    final public int rhsB;

    /**
	 * 
	 */
    public NF8(Datatype lhsD, int rhsB) {
        this.lhsD = lhsD;
        this.rhsB = rhsB;
    }


    public static NF8 getInstance(Datatype d, int b) {
