本文整理汇总了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);
}
示例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;
}
示例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);
}
}
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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());
}
示例9: get
import org.osgl.util.C; //导入方法依赖的package包/类
@Override
public C.Set<?> get() {
return C.newSet();
}
示例10: setEmails
import org.osgl.util.C; //导入方法依赖的package包/类
public void setEmails(Collection<String> emails) {
this.emails = C.newSet(emails);
}
示例11: controllerClasses
import org.osgl.util.C; //导入方法依赖的package包/类
public Set<String> controllerClasses() {
return C.newSet(controllerClasses);
}