admin管理员组

文章数量:1531357

2024年4月7日发(作者:)

private Integer sort;

private Integer priority;

public TestDto(Integer id, Integer sort, Integer priority) {

= id;

= sort;

ty = priority;

}

public TestDto() {

}

public Integer getId() {

return id;

}

public void setId(Integer id) {

= id;

}

public Integer getSort() {

return sort;

}

public void setSort(Integer sort) {

= sort;

}

public Integer getPriority() {

return priority;

}

public void setPriority(Integer priority) {

ty = priority;

}

@Override

public String toString() {

return "TestDto{" +

"id=" + id +

", sort=" + sort +

", priority=" + priority +

'}';

}

public static List getDtos(){

List dtos=new ArrayList<>();

TestDto dto1=new TestDto(1,2,3);

TestDto dto2=new TestDto(2,3,1);

TestDto dto3=new TestDto(3,1,2);

(dto1);

(dto2);

(dto3);

return dtos;

}

}

本文标签: 对象降序升序属性排序