This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 毫秒时间戳转合适时间长度 | |
* | |
* @param millis 毫秒时间戳 | |
* | |
* 小于等于0,返回null | |
* @param precision 精度 | |
* | |
* * precision = 0,返回null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.* | |
import kotlin.concurrent.thread | |
/** | |
* @describe 最近最少使用队列, 只能使用這里override的api哦 | |
* @author XQ Yang | |
* @date 4/3/2019 3:09 PM | |
*/ | |
class LRURequestTimeQueue<T>(val maxSize: Int, private val realQueue: LinkedList<T> = LinkedList()):Deque<T> by realQueue { |