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

📄 kylelists.java

📁 创建中间企业对象层
💻 JAVA
字号:
/**
 ************************************************************
 * The VML Report
 *
 *
 *
 ************************************************************
 * @author duke
 * @version 1.2
 * @date 2004-8-10 14:37
 */
 
package com.kyle.eobject;

import java.io.*;
import java.sql.*;

class KyleListsItem
{
	public KyleListsItem(String uri, KyleList value)
	{
		this.setUri(uri);
		this.setValue(value);
	}
	
	public void setUri(String uri)
	{
		this.uri=uri;
	}
	
	public void setValue(KyleList value)
	{
		this.value=value;
	}
	
	public String getUri()
	{
		return uri;
	}
	
	public KyleList getVlaue()
	{
		return value;
	}
	
	private String uri;
	private KyleList value;
}


public class KyleLists
{
	public KyleLists()
	{
	}

	public int getCount()
	{
		return objs.length;
	}

	
	public int getIndexByUri(String uri)
	{
		if (getCount()==0) return -1;
		for(int i=0;i<getCount();i++)
		{
			if(objs[i].getUri().equalsIgnoreCase(uri)) return i;
		}
		return -1;
	}
	
	public KyleList getObj(int index)
	{
		if (index<0 || index>=getCount()) return null;
		return objs[index].getVlaue();
	}
	
	public KyleList getObj(String uri)
	{
		int index=getIndexByUri(uri);
		return getObj(index);
	}
	
	//增加数据
	public void addObj(String uri, KyleList obj)
	{
		if (getIndexByUri(uri)==-1) addStdObj(uri, obj);
	}
	
	
	protected void addStdObj(String uri, KyleList obj) 
	{
		int len = objs.length ;
		KyleListsItem[] newobjs = new KyleListsItem[len + 1];
		System.arraycopy(objs, 0, newobjs, 0, len);
        newobjs[len] = new KyleListsItem(uri,obj);
        objs = newobjs;
	}

	//容器
	private KyleListsItem[] objs = new KyleListsItem[0];
	
	
	public static void main(String args[]) throws Exception
	{
		System.out.println("sss");
		
		
	}
}

⌨️ 快捷键说明

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