📄 header.java
字号:
class Header
{
String name;
String key;
String keyType;
String []attri;
int count=0;
boolean delete=false;
Header(){}
Header(Header h1,Header h2)
{
setName(new String(h1.getName().trim()+h2.getName().trim()));
String[] str=new String[44];String name1=h1.getName().trim();String name2=h2.getName().trim();
str[0]=name1+"."+h1.getKey();
str[1]=name2+"."+h1.getType();
int i=0;int j=0;
for(i=0;i<h1.getCount()-1;i++)
str[i+2]=name1+"."+h1.getAttri()[i];
str[2]=name2+"."+h2.getKey();
str[3]=name2+"."+h2.getType();
for(j=0;j<h2.getCount()-1;j++)
str[i+j+4]=name2+"."+h2.getAttri()[j];
attri=str;
setCount(i+j+4+1);
}
String getKey()
{
return key;
}
String getType()
{
return keyType;
}
void setName(String na)
{
name=new String(na);
}
String getName()
{
return name;
}
void setCount(int i)
{
count=i;
}
void delete()
{
delete=true;
}
void setKey(String value)
{
key=value;
}
void setType(String type)
{
keyType=type;
}
void setAttri(String at[])
{
attri=new String[2*(count-1)];
for(int i=0;i<attri.length;i++)
attri[i]=at[i];
}
String [] getAttri()
{
return attri;
}
int getCount()
{
return count;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -