#
zc
2025-05-05 1c06b5c81f4187f1e9b7f4e5aa96a563637c6c12
src/main/java/com/zy/core/News.java
@@ -23,7 +23,9 @@
        System.out.println(News.print());
    }
    interface NewsSupport<T> { boolean execute(T t); }
    interface NewsSupport<T> {
        boolean execute(T t);
    }
    private static final NewsQueue<NewsDomain> NEWS_QUEUE = new NewsQueue<>(NewsDomain.class, 1024);
@@ -36,7 +38,10 @@
        private int head;
        private int tail;
        { this.head = 0; this.tail = 0; }
        {
            this.head = 0;
            this.tail = 0;
        }
        public NewsQueue(Class<T> cls, int capacity) {
            this.cls = cls;
@@ -187,7 +192,9 @@
            StringBuilder sb = new StringBuilder(str);
            for (Object obj : objs) {
                int idx = sb.indexOf("{}");
                if (idx == -1) { break; }
                if (idx == -1) {
                    break;
                }
                sb.replace(idx, idx + 2, String.valueOf(obj));
            }
            return sb.toString();
@@ -212,6 +219,7 @@
        ERROR(3),
        ;
        public int idx;
        NewsLevel(int idx) {
            this.idx = idx;
        }