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

com.articulate.sigma.AVPair Maven / Gradle / Ivy

Go to download

Sigma knowledge engineering system is an system for developing, viewing and debugging theories in first order logic. It works with Knowledge Interchange Format (KIF) and is optimized for the Suggested Upper Merged Ontology (SUMO) www.ontologyportal.org.

There is a newer version: 2.10
Show newest version

/* This code is copyrighted by Articulate Software (c) 2003.
It is released underthe GNU Public License .
Users ofthis code also consent, by use of this code, to credit Articulate Software in any
writings, briefings,publications, presentations, or other representations of any
software which incorporates, builds on, or uses this code.*/

package com.articulate.sigma;


public class AVPair implements Comparable {

    public String attribute ="";  // this is the sort field for comparison
    public String value = "";

    public int compareTo(Object avp) throws ClassCastException {

        if (!avp.getClass().getName().equalsIgnoreCase("com.articulate.sigma.AVPair"))
            throw new ClassCastException("Error in AVPair.compareTo(): "
                                         + "Class cast exception for argument of class: "
                                         + avp.getClass().getName());
        //System.out.println("Info in AVPair.compareTo(): comparing: " + attribute +
        //        "to: " + ((AVPair) avp).attribute);
        return attribute.compareTo(((AVPair) avp).attribute);
    }

    public String toString() {

        return "[" + attribute + "," + value + "]";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy