mybatis里使用枚举Enum判断
摘要:<if test="dtEnum == @com.xxx.xxx.TestTypeEnum@HOUR"> DATE_FORMAT(TM,'%Y-%m-%d %H') as keyStr, </if> TestTypeEnum定义如下: HOUR("hour"), DAY("day"), MONTH(
阅读全文
posted @
2021-01-29 18:49
毛会懂
阅读(3182)
推荐(0) 编辑
自定义最小索引优先队列
摘要:/** * @desc: 自定义最小索引优先队列,可修改,删除索引对应的值 * @author: 毛会懂 * @create: 2021-01-06 17:20:00 **/ public class MyMinIndexPriorityQueue<T extends Comparable<T>>
阅读全文
posted @
2021-01-14 19:16
毛会懂
阅读(120)
推荐(0) 编辑
单例模式之双重检测锁
摘要:/** * 单例模式之双检锁 * @author ring2 * 懒汉式升级版 */ public class Singleton3 { private static volatile Singleton3 instance; private Singleton3() {} public stati
阅读全文
posted @
2021-01-10 23:04
毛会懂
阅读(460)
推荐(0) 编辑
自定义最大索引优先队列
摘要:/** * @desc: 自定义索引优先队列,可修改,删除索引对应的值 * @author: 毛会懂 * @create: 2021-01-06 17:20:00 **/ public class MyIndexPriorityQueue<T extends Comparable<T>> { pri
阅读全文
posted @
2021-01-07 13:41
毛会懂
阅读(79)
推荐(0) 编辑
自定义最小优先队列
摘要:** * @desc: 最小优先队列,值越小,优先级越高,其实就是构造小顶堆 * @author: 毛会懂 * @create: 2021-01-06 16:34:00 **/public class MyMinPriorityQueue<T extends Comparable<T>> { pri
阅读全文
posted @
2021-01-07 13:34
毛会懂
阅读(154)
推荐(0) 编辑
自定义最大优先队列
摘要:/** * @desc: 最大优先队列,值越大,优先级越高,其实就是构造大顶堆 * @author: 毛会懂 * @create: 2021-01-06 16:32:00 **/ public class MyMaxPriorityQueue<T extends Comparable<T>> { p
阅读全文
posted @
2021-01-07 13:33
毛会懂
阅读(90)
推荐(0) 编辑
自定义堆排序:从小到大排序
摘要:/** * @desc: 自定义堆排序:从小到大排序 * @author: 毛会懂 * @create: 2021-01-06 14:50:00 **/ public class MyHeapSort<T> { public static void sort(Comparable[] source)
阅读全文
posted @
2021-01-07 11:54
毛会懂
阅读(405)
推荐(0) 编辑
自定义堆结构:构造大顶堆
摘要:/** * @desc: 自定义堆结构:构造大顶堆,实现插入和删除操作 * @author: 毛会懂 * @create: 2021-01-06 10:35:00 **/ public class MyHeap<T extends Comparable<T>>{ private T[] arr; p
阅读全文
posted @
2021-01-07 11:51
毛会懂
阅读(164)
推荐(0) 编辑
自定义二叉查找树基本操作
摘要:/** * @desc: 自定义二叉查找树: 插入键值对,根据key查找元素值,删除节点,取最大(小)的元素值, * 前序(中序,后序,层次)遍历,树的高度 * @author: 毛会懂 * @create: 2021-01-05 14:11:00 **/ public class MyBinary
阅读全文
posted @
2021-01-07 11:44
毛会懂
阅读(114)
推荐(0) 编辑