/*
* JBoss, Home of Professional Open Source.
* See the COPYRIGHT.txt file distributed with this work for information
* regarding copyright ownership. Some portions may be licensed
* to Red Hat, Inc. under one or more contributor license agreements.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*/
package org.teiid.core.designer.id;
/**
* @since 8.0
*/
public interface ObjectID extends Comparable {
char DELIMITER = ':';
/**
* Compares this object to another. If the specified object is not an instance of
* the ObjectID class, then this method throws a
* ClassCastException (as instances are comparable only to instances of the same
* class).
* Note: this method <i>is</i> consistent with <code>equals()</code>, meaning
* that <code>(compare(x, y)==0) == (x.equals(y))</code>.
* <p>
* @param obj the object that this instance is to be compared to; may not be null.
* @return a negative integer, zero, or a positive integer as this object
* is less than, equal to, or greater than the specified object, respectively.
* @throws ClassCastException if the specified object's type prevents it
* from being compared to this instance.
*/
@Override
int compareTo(Object obj);
/**
* Returns a string representing the current state of the object.
* @return the string representation of this instance.
*/
@Override
String toString();
/**
* Returns a string representing the current state of the object.
* @param delim the delimiter that should be used
* @return the string representation of this instance.
*/
String toString( char delim );
/**
* Return the name of the protocol that this factory uses.
* @return the protocol name
*/
String getProtocol();
}