同级目录排序问题,置顶、置底、上移、下移 Java

同级目录排序问题,置顶、置底、上移、下移 Java_第1张图片

参考代码实现如下(还需优化):


```java
public class SortUtils {

    // 当前数据节点
    private BusinessSystemFunctionData current;
    // 兄弟节点数据
    private List brother;
    //以当前节点分割,当前之前的数据
    private List beforeList;
    //以当前节点分割,当前之后的数据
    private List afterList;
    // 当前节点的下标
    private int currintIndex;
    // 兄弟节点是否包含当前节点
    private boolean constan;


    public SortUtils(BusinessSystemFunctionData businessSystemFunctionData, List list) {
        this.current = businessSystemFunctionData;
        this.brother = list;
        check();
    }

 

你可能感兴趣的:(java,数据结构,单元测试)