本文整理汇总了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);
}
}
}
示例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()]));
}
}
示例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: 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;
}
}));
}
示例5: get
import org.osgl.util.C; //导入方法依赖的package包/类
@Override
public C.Set<?> get() {
return C.newSet();
}
示例6: createEvent
import org.osgl.util.C; //导入方法依赖的package包/类
private FsEvent createEvent(FsEvent.Kind kind, C.Set<String> paths) {
return new FsEvent(kind, prependContext(paths));
}