不明白这个方法什么意思

来源:百度知道 编辑:UC知道 时间:2024/05/26 01:52:56
public class StatSerialNoSchema implements Serializable
{
private int num = 0 ;
private int f1 = 0 ;
private int f2 = 0 ;
private int f3 = 0 ;
private int f4 = 0 ;
/**
* 构造函数
*/
public StatSerialNoSchema(){
}
/**
* 设置属性Num
* @param num
*/
public void setNum(int num)
{
this.num = num;
}
/**
* 获取属性ClauseType
* @return ClauseType
*/
public int getNum(){
return num;
}
/**
* 设置属性ClauseVer
* @param ClauseVer ClauseVer
*/
public void setf1(int f1)
{
this.f1 = f1 ;
}
/**
* 获取属性f1
* @return ClauseVer
*/
public int getf1(){
return f1;
}
/**
* 设置属性f2
* @param AreaGr

我不知道你补充里面具体要问什么,我就你写的这个类解释一下:
//首先一个命名为StatSerialNoSchema ,并且实现了序列化
public class StatSerialNoSchema implements Serializable
{
//定义了5个私有属性
private int num = 0 ;
private int f1 = 0 ;
private int f2 = 0 ;
private int f3 = 0 ;
private int f4 = 0 ;
/**
* 构造函数
*/
public StatSerialNoSchema(){
}

//中间这些是几个私有属性的get/set方法,这在eclipse下可以自动生成,为了后面使用方便,不用多解释了。

//这是同一个方法setSchema的不同带参形式,可能下面要使用同一方法的不同传参方式吧,里面的具体写法,只是把传参的值赋给当前私有属性。
public void setSchema(int num,int f1,int f2,int f3,int f4)
{
this.num = num;
this.f1 = f1;
this.f2 = f2;
this.f3 = f3;
this.f4 = f4;
}
public void setSchema(int num,int f1,int f2,int f3)
{
this.num = num;
this.f1 = f1;
this.f2 = f2;
this.f3 = f3;
this.f4 = 0;
}
public void setSchema(int num,int f1,int f2)
{
this.num = num;
this.f1 = f1;
this.f2 =