racerillegalconstruction.java

来自「Semantic Web Ontology Editor」· Java 代码 · 共 36 行

JAVA
36
字号
package org.mindswap.swoop.racer;

/** This exception is thrown by RacerTermParser objects when a construction does not correspond to a
	RACER term.
 */
 
public class RacerIllegalConstruction extends RacerException {
/**
 * RacerIllegalConstruction constructor comment.
 * @param racerError java.lang.String
 */
public RacerIllegalConstruction(String racerError) {
	super(racerError);
}
/** Builds a illegal construction exception for a vector in which the illegal construction is stored.
 * @param v java.util.Vector The vector in which the construction is stored.
 */
 
public RacerIllegalConstruction(java.util.Vector v) {
	super(listRepresentation(v)+" is not a correct "+v.elementAt(0)+" term");
}
/** This method returns the string representation of the term stored in the vector.
 * @return java.lang.String
 * @param v java.util.Vector
 */
 
private static String listRepresentation(java.util.Vector v) {
	String s="(";
	for(int i=0;i<v.size();i++) {
		s=s+v.elementAt(i);
		if (i+1<v.size()) s=s+" ";
	}
	return s+")";
}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?