当前位置: 首页>>代码示例>>Java>>正文


Java C.Set方法代码示例

本文整理汇总了Java中org.osgl.util.C.Set方法的典型用法代码示例。如果您正苦于以下问题:Java C.Set方法的具体用法?Java C.Set怎么用?Java C.Set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.osgl.util.C的用法示例。


在下文中一共展示了C.Set方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mergeFromWithList

import org.osgl.util.C; //导入方法依赖的package包/类
private void mergeFromWithList(final ControllerClassMetaInfoManager infoBase, final App app) {
    C.Set<String> withClasses = this.withList;
    if (withClasses.isEmpty()) {
        return;
    }
    ClassInfoRepository repo = app.classLoader().classInfoRepository();
    for (final String withClass : withClasses) {
        String curWithClass = withClass;
        ControllerClassMetaInfo withClassInfo = infoBase.controllerMetaInfo(curWithClass);
        while (null == withClassInfo && !"java.lang.Object".equals(curWithClass)) {
            ClassNode node = repo.node(curWithClass);
            if (null != node) {
                node = node.parent();
            }
            if (null == node) {
                break;
            }
            curWithClass = node.name();
            withClassInfo = infoBase.controllerMetaInfo(curWithClass);
        }
        if (null != withClassInfo) {
            withClassInfo.merge(infoBase, app);
            interceptors.mergeFrom(withClassInfo.interceptors);
        }
    }
}
 
开发者ID:actframework,项目名称:actframework,代码行数:27,代码来源:ActionMethodMetaInfo.java

示例2: check

import org.osgl.util.C; //导入方法依赖的package包/类
private void check(Map<String, Long> newTimestamps) {
    C.List<FsEvent> events = C.newSizedList(3);

    C.Set<String> set0 = C.set(timestamps.keySet());
    C.Set<String> set1 = C.set(newTimestamps.keySet());

    C.Set<String> added = set1.without(set0);
    if (!added.isEmpty()) {
        events.add(createEvent(FsEvent.Kind.CREATE, added));
    }

    C.Set<String> removed = set0.without(set1);
    if (!removed.isEmpty()) {
        events.add(createEvent(FsEvent.Kind.DELETE, removed));
    }

    C.Set<String> retained = set1.withIn(set0);
    C.Set<String> modified = modified(retained, newTimestamps);
    if (!modified.isEmpty()) {
        events.add(createEvent(FsEvent.Kind.MODIFY, modified));
    }

    if (!events.isEmpty()) {
        trigger(events.toArray(new FsEvent[events.size()]));
    }
}
 
开发者ID:actframework,项目名称:actframework,代码行数:27,代码来源:FsChangeDetector.java

示例3: mergeFromWithList

import org.osgl.util.C; //导入方法依赖的package包/类
private void mergeFromWithList(final ControllerClassMetaInfoManager infoBase, final App app) {
    C.Set<String> withClasses = C.newSet();
    getAllWithList(withClasses, infoBase);
    final ControllerClassMetaInfo me = this;
    ClassInfoRepository repo = app.classLoader().classInfoRepository();
    for (final String withClass : withClasses) {
        String curWithClass = withClass;
        ControllerClassMetaInfo withClassInfo = infoBase.controllerMetaInfo(curWithClass);
        while (null == withClassInfo && !"java.lang.Object".equals(curWithClass)) {
            ClassNode node = repo.node(curWithClass);
            if (null != node) {
                node = node.parent();
            }
            if (null == node) {
                break;
            }
            curWithClass = node.name();
            withClassInfo = infoBase.controllerMetaInfo(curWithClass);
        }
        if (null != withClassInfo) {
            withClassInfo.merge(infoBase, app);
            if (isMyAncestor(withClassInfo)) {
                interceptors.mergeFrom(withClassInfo.interceptors, me);
            } else {
                interceptors.mergeFrom(withClassInfo.interceptors);
            }
        }
    }
}
 
开发者ID:actframework,项目名称:actframework,代码行数:30,代码来源:ControllerClassMetaInfo.java

示例4: prependContext

import org.osgl.util.C; //导入方法依赖的package包/类
private Set<String> prependContext(C.Set<String> paths) {
    return C.set(paths.map(new $.F1<String, String>() {
        @Override
        public String apply(String s) throws NotAppliedException, $.Break {
            return context + s;
        }
    }));
}
 
开发者ID:actframework,项目名称:actframework,代码行数:9,代码来源:FsChangeDetector.java

示例5: get

import org.osgl.util.C; //导入方法依赖的package包/类
@Override
public C.Set<?> get() {
    return C.newSet();
}
 
开发者ID:osglworks,项目名称:java-di,代码行数:5,代码来源:OsglSetProvider.java

示例6: createEvent

import org.osgl.util.C; //导入方法依赖的package包/类
private FsEvent createEvent(FsEvent.Kind kind, C.Set<String> paths) {
    return new FsEvent(kind, prependContext(paths));
}
 
开发者ID:actframework,项目名称:actframework,代码行数:4,代码来源:FsChangeDetector.java


注:本文中的org.osgl.util.C.Set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。