⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 convertisseur.java

📁 exemple for Document Object Model DOM
💻 JAVA
字号:
package mod鑜es;
import java.util.Vector;

/**
*  Classe permettant la conversion de plusieurs Types.
*  Elle contient donc un vecteur de Type et permet de
*  chercher la conversion d'un type.
*/
class Convertisseur
{
	@SuppressWarnings("unchecked")
	private Vector types;
	@SuppressWarnings("unchecked")
	Convertisseur()
	{
		this.types= new Vector();
	}
	/**
        * Ajoute un type
        */
	@SuppressWarnings("unchecked")
	public void addType(Type type)
	{
		this.types.add(type);
	}
	public void addType(String t1,String t2)
	{
		Type type=new Type(t1,t2);
		this.addType(type);
	}
	public String convertir(String type)
	{
		int i=0;
		System.out.println("VectorSize:"+this.types.size()+" "+type);
		while((i<this.types.size()) && (type.equals((String)((Type)(this.types.elementAt(i))).getTypeOrigine())!=true))
		{           System.out.println("type: "+type+" elementAT("+i+") "+((Type)this.types.elementAt(i)).getTypeOrigine());
		            System.out.println(type.equals((String)((Type)(this.types.elementAt(i))).getTypeOrigine()));
			i++;
		}
		System.out.println("i apres boucle == "+i);
		if(i==this.types.size())
		{
			return new String("varchar(40)");
                }
		return (String)((Type)(this.types.elementAt(i))).getTypeConvertit();
	}
	
}

⌨️ 快捷键说明

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