📄 itemattribute.java
字号:
import java.io.*;//to serialize the record so it can be write into the file with the method WriteObject()//notice that the parent class should implement the Interface 'Serializable'//Use integers to choose the contents of constrains public class ItemAttribute implements Serializable{ //attribute name private String name; //attribute type private int type; //length of the field private int length; //the tag of the constrain private boolean constrainTag; //the constrain of the field private int constrain; public ItemAttribute() { this ( "",0,0,true,0 ); } public ItemAttribute( String gn, int gt, int gl, boolean gct, int gc ) { setName ( gn ); setType ( gt ); setLength ( gl ); setConstrainTag ( gct ); setConstrain ( gc ); } public void setName( String gn ) { name = gn; } public String getName () { return name; } public void setType( int gt ) { type = gt; } public int getType () { return type; } public void setLength( int gl ) { length = gl; } public int getLength () { return length; } public void setConstrainTag( boolean gct ) { constrainTag = gct; } public boolean getConstrainTag () { return constrainTag; } public void setConstrain( int gc ) { constrain = gc; } public int getConstrain () { return constrain; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -