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


Java C.newSet方法代码示例

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


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

示例1: createTicket

import org.osgl.util.C; //导入方法依赖的package包/类
@Override
public final T createTicket(H.Session session) {
    String id = session.id();
    Map<String, String> map = new HashMap<>();
    Set<String> keys = this.keys;
    if (keys.isEmpty()) {
        keys = C.newSet(session.keySet());
        keys.remove(H.Session.KEY_EXPIRATION);
        keys.remove(H.Session.KEY_ID);
    }
    for (String key : keys) {
        String val = session.get(key);
        if (null != val) {
            map.put(key, val);
        }
    }
    return serialize(id, map);
}
 
开发者ID:actframework,项目名称:actframework,代码行数:19,代码来源:SecureTicketCodec.java

示例2: _init

import org.osgl.util.C; //导入方法依赖的package包/类
private void _init() {
    Set<Class> s = C.newSet();
    s.add(BigDecimal.class);
    s.add(BigInteger.class);

    s.add(Date.class);
    s.add(java.sql.Date.class);
    s.add(Calendar.class);
    s.add(DateTime.class);
    s.add(Instant.class);
    s.add(LocalDate.class);
    s.add(LocalDateTime.class);
    s.add(LocalTime.class);

    terminators = s;

    Set<String> s0 = C.newSet();
    for (Class c: s) {
        s0.add(c.getName());
    }

    s0.add("java.time.Instant");
    s0.add("java.time.LocalTime");
    s0.add("java.time.LocalDate");
    s0.add("java.time.LocalDateTime");
    s0.add("org.bson.types.ObjectId");

    extendedTerminators = s0;
}
 
开发者ID:actframework,项目名称:actframework,代码行数:30,代码来源:DataPropertyRepository.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: addDependencyClass

import org.osgl.util.C; //导入方法依赖的package包/类
protected final void addDependencyClass(String className) {
    Set<String> set = dependencyClasses.get(getClass());
    if (null == set) {
        set = C.newSet();
        dependencyClasses.put(getClass(), set);
    }
    set.add(className);
}
 
开发者ID:actframework,项目名称:actframework,代码行数:9,代码来源:AppByteCodeScannerBase.java

示例5: addDependencyClassToScanner

import org.osgl.util.C; //导入方法依赖的package包/类
protected final void addDependencyClassToScanner(Class<? extends AppByteCodeScanner> scannerClass, String className) {
    Set<String> set = dependencyClasses.get(scannerClass);
    if (null == set) {
        set = C.newSet();
        dependencyClasses.put(scannerClass, set);
    }
    set.add(className);
}
 
开发者ID:actframework,项目名称:actframework,代码行数:9,代码来源:AppByteCodeScannerBase.java

示例6: timers

import org.osgl.util.C; //导入方法依赖的package包/类
@Override
public List<MetricInfo> timers() {
    Set<MetricInfo> set = C.newSet();
    for (Map.Entry<String, AtomicLong> entry : timers.entrySet()) {
        set.add(new MetricInfo(entry.getKey(), entry.getValue().get(), counters.get(entry.getKey()).get()));
    }
    return C.list(set);
}
 
开发者ID:actframework,项目名称:actframework,代码行数:9,代码来源:SimpleMetricStore.java

示例7: callOn

import org.osgl.util.C; //导入方法依赖的package包/类
private <T extends EventObject> void callOn(final T event, List<? extends ActEventListener> listeners, boolean async) {
    if (null == listeners) {
        return;
    }
    JobManager jobManager = null;
    if (async) {
        jobManager = app().jobManager();
    }
    Set<ActEventListener> toBeRemoved = C.newSet();
    for (final ActEventListener l : listeners) {
        if (!async) {
            boolean result = callOn(event, l);
            if (result && once) {
                toBeRemoved.add(l);
            }
        } else {
            jobManager.now(new Runnable() {
                @Override
                public void run() {
                    callOn(event, l);
                }
            });
        }
    }
    if (once && !toBeRemoved.isEmpty()) {
        listeners.removeAll(toBeRemoved);
    }
}
 
开发者ID:actframework,项目名称:actframework,代码行数:29,代码来源:EventBus.java

示例8: predefinedFormatOrdinalShallBeDifferentFromEachOther

import org.osgl.util.C; //导入方法依赖的package包/类
@Test
public void predefinedFormatOrdinalShallBeDifferentFromEachOther() {
    Set<Integer> ordinals = C.newSet();
    List<H.Format> predefined = H.Format.predefined();
    for (H.Format f : predefined) {
        ordinals.add(f.ordinal());
    }
    eq(ordinals.size(), predefined.size());
}
 
开发者ID:osglworks,项目名称:java-http,代码行数:10,代码来源:FormatTest.java

示例9: get

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

示例10: setEmails

import org.osgl.util.C; //导入方法依赖的package包/类
public void setEmails(Collection<String> emails) {
    this.emails = C.newSet(emails);
}
 
开发者ID:actframework,项目名称:actframework,代码行数:4,代码来源:Contact.java

示例11: controllerClasses

import org.osgl.util.C; //导入方法依赖的package包/类
public Set<String> controllerClasses() {
    return C.newSet(controllerClasses);
}
 
开发者ID:actframework,项目名称:actframework,代码行数:4,代码来源:AppConfigurator.java


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