Repository navigation
Expand file tree
/
Copy pathStudent.java
More file actions
65 lines (55 loc) · 1.64 KB
/
Copy pathStudent.java
File metadata and controls
65 lines (55 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package testapp.model;
import act.asm.Type;
import act.data.Data;
import org.osgl.$;
@Data(callSuper = true)
public class Student extends Person {
private String clazz;
private String studentId;
private double score;
public Student(String fn, String ln, Address addr, int age, String clazz, String studentId, double score) {
super(fn, ln, addr, age);
this.clazz = clazz;
this.studentId = studentId;
this.score = score;
}
public String getClazz() {
return clazz;
}
public void setClazz(String clazz) {
this.clazz = clazz;
}
public String getStudentId() {
return studentId;
}
public void setStudentId(String studentId) {
this.studentId = studentId;
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof Student) {
Student that = (Student) obj;
return super.equals(that) && $.eq(that.clazz, this.clazz) && $.eq(that.studentId, this.studentId) && $.eq(that.score, this.score);
}
return false;
}
@Override
public int hashCode() {
String foo = "";
int bar = 4;
byte z = 2;
return $.hc(clazz, studentId, score, foo, bar, z, super.hashCode());
}
public static void main(String[] args) {
Type type = Type.DOUBLE_TYPE;
System.out.println(type);
type = Type.getType(String.class);
System.out.println(type);
type = Type.getType(Student.class);
System.out.println(type);
System.out.println(type.getInternalName());
}
}