• JAVA日报


    从零开始的体温app开发(bean)

    两种get set 方法任选其一

    package bean;

    import java.io.Serializable;

    public class User implements Serializable {
    private String name;
    private String num;
    private String cl;
    private String date;
    private String time;
    private String area;
    private String tem;
    private String qw;
    public User() {
    }

    public User(String name,String num,String cl, String date, String time, String area, String tem,String qw) {
    this.name=name;
    this.num=num;
    this.cl=cl;
    this.date=date;
    this.time=time;
    this.area=area;
    this.tem=tem;
    this.qw=qw;
    }

    public String get(String str) {
    String temp = null;
    if(str.equals("name")) {
    temp=name;
    }else if(str.equals("num")) {
    temp=num;
    }else if(str.equals("cl")) {
    temp=cl;
    }else if(str.equals("time")) {
    temp=time;
    }else if(str.equals("area")) {
    temp=area;
    }else if(str.equals("tem")) {
    temp=tem;
    }else if(str.equals("date")) {
    temp=date;
    }
    else if(str.equals("qw")) {
    temp=qw;
    }
    return temp;
    }
    public void set(String str, String temp) {
    if(str.equals("name")) {
    name=temp;
    }else if(str.equals("num")) {
    num=temp;
    }else if(str.equals("cl")) {
    cl=temp;
    }else if(str.equals("time")) {
    time=temp;
    }else if(str.equals("area")) {
    area=temp;
    }else if(str.equals("tem")) {
    tem=temp;
    }else if(str.equals("date")) {
    date=temp;
    }
    else if(str.equals("qw")) {
    date=qw;
    }
    }


    public String getName() {
    return name;
    }

    public void setName(String name) {
    this.name = name;
    }

    public String getNum() {
    return num;
    }

    public void setNum(String num) {
    this.num = num;
    }

    public String getCl() {
    return cl;
    }

    public void setCl(String cl) {
    this.cl = cl;
    }

    public String getDate() {
    return date;
    }

    public void setDate(String date) {
    this.date = date;
    }

    public String getTime() {
    return time;
    }

    public void setTime(String time) {
    this.time = time;
    }

    public String getArea() {
    return area;
    }

    public void setArea(String area) {
    this.area = area;
    }

    public String getTem() {
    return tem;
    }

    public void setTem(String tem) {
    this.tem = tem;
    }

    public String getQw() {
    return qw;
    }

    public void setQw(String qw) {
    this.qw = qw;
    }
    }
  • 相关阅读:
    vux 数据模拟mockjs的使用
    vux 配置颜色问题
    vue-router 学习
    vue 学习笔记
    点击加载更多
    table td 固定宽度
    js scroll 滚动连续多次触发事件只执行一次
    Merge into的注意点之ORA-30926: 无法在源表中获得一组稳定的行?
    js页面中取值的注意点
    insert into的方式
  • 原文地址:https://www.cnblogs.com/mumulailai/p/14906229.html
Copyright © 2020-2023  润新知