Class WheelList<E>

java.lang.Object
org.qiunet.utils.collection.wheel.WheelList<E>

public class WheelList<E> extends Object
环形列表
Author:
qiunet 2022/8/2 17:21
  • Constructor Details

    • WheelList

      public WheelList(List<E> list)
  • Method Details

    • nextForeach

      public int nextForeach(int preIndex, IndexForeach<E> consumer)
      从pos 下一个开始循环一圈查找
      Parameters:
      preIndex - 从preIndex的下一个数据开始查找
      consumer - 消费者
      Returns:
      最后的index
    • foreach

      public int foreach(int startIndex, IndexForeach<E> consumer)
      从pos 开始循环一圈查找
      Parameters:
      startIndex - 开始查找的Index
      consumer - 消费者
      Returns:
      最后的index