java.util.Set.of()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(226)

本文整理了Java中java.util.Set.of()方法的一些代码示例,展示了Set.of()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Set.of()方法的具体详情如下:
包路径:java.util.Set
类名称:Set
方法名:of

Set.of介绍

暂无

代码示例

代码示例来源:origin: no.ssb.lds/linked-data-store-persistence-provider-neo4j

@Override
public Set<String> configurationKeys() {
  return Set.of(
      "neo4j.cypher.show",
      "neo4j.driver.url",
      "neo4j.driver.username",
      "neo4j.driver.password"
  );
}

代码示例来源:origin: no.ssb.lds/linked-data-store-persistence-provider-foundationdb

@Override
public Set<String> configurationKeys() {
  return Set.of(
      "foundationdb.directory.node-prefix.hex",
      "foundationdb.directory.content-prefix.hex",
      "persistence.fragment.capacity"
  );
}

代码示例来源:origin: bytemanproject/byteman

@Override
public Set<ModuleReference> findAll()
{
  return Set.of(reference);
}

代码示例来源:origin: org.jboss.byteman/byteman-layer

@Override
public Set<ModuleReference> findAll()
{
  return Set.of(reference);
}

代码示例来源:origin: no.ssb.lds/linked-data-store-persistence-provider-memory

@Override
public Set<String> configurationKeys() {
  return Set.of(
      "persistence.mem.wait.min",
      "persistence.mem.wait.max",
      "persistence.fragment.capacity"
  );
}

代码示例来源:origin: io.github.factoryfx/data

@JsonIgnore
private Set<Data> getParents(){
  if (parents==null){
    if (parent==null){
      return Collections.emptySet();
    }
    return Set.of(parent);
  } else {
    return parents;
  }
}

代码示例来源:origin: no.ssb.lds/linked-data-store-persistence-provider-test

public static TestSpecificationElement objectNode(SpecificationElementType elementType, String name, Set<TestSpecificationElement> properties) {
  TestSpecificationElement mapElement = new TestSpecificationElement(name, elementType, Set.of("object"), List.of(), Set.of(),
      new TreeMap<>(properties.stream().collect(Collectors.toMap(e -> e.getName(), e -> e))), null);
  properties.forEach(e -> e.parent(mapElement));
  return mapElement;
}

代码示例来源:origin: br.com.jarch/jarch-apt

@Override
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
  roundEnv
      .getElementsAnnotatedWithAny(Set.of(JArchValidRequired.class/*, JArchValidRequired.List.class*/))
      .stream()
      .forEach(element -> validRequired(element));
  return false;
}

代码示例来源:origin: br.com.jarch/jarch-apt

@Override
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
  roundEnv
      .getElementsAnnotatedWithAny(Set.of(JArchSearchFieldLookup.class, JArchSearchFieldLookup.List.class))
      .stream()
      .forEach(element -> validSearchField(element));
  return false;
}

代码示例来源:origin: br.com.jarch/jarch-apt

@Override
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
  roundEnv
      .getElementsAnnotatedWithAny(Set.of(JArchColumnDataTable.class, JArchColumnDataTable.List.class))
      .stream()
      .forEach(element -> validColumnDataTable(processingEnv, element));
  return false;
}

代码示例来源:origin: br.com.jarch/jarch-apt

@Override
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
  roundEnv
      .getElementsAnnotatedWithAny(Set.of(JArchSearchTab.class, JArchSearchTab.List.class))
      .stream()
      .forEach(element -> validSearchTab(element));
  return false;
}

代码示例来源:origin: br.com.jarch/jarch-apt

@Override
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
  roundEnv
      .getElementsAnnotatedWithAny(Set.of(JArchSearchFieldCombobox.class, JArchSearchFieldCombobox.List.class))
      .stream()
      .forEach(element -> validComboBox(element));
  return false;
}

代码示例来源:origin: com.github.tornaia/aott-desktop-client-core

private Set<String> prefixAndPostfix(String title) {
  for (String separator : GroupTitleUtils.getGroupSeparators()) {
    String[] splittedTitle = title.split(separator);
    if (splittedTitle.length > 1) {
      String prefix = splittedTitle[0];
      String postfix = splittedTitle[splittedTitle.length - 1];
      return Set.copyOf(asList(prefix, postfix));
    }
  }
  return Set.of(title);
}

代码示例来源:origin: br.com.jarch/jarch-apt

@Override
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
  roundEnv
      .getElementsAnnotatedWithAny(Set.of(JArchSearchFieldComboboxCommandJpa.class, JArchSearchFieldComboboxCommandJpa.List.class))
      .stream()
      .forEach(element -> validComboBox(element));
  return false;
}

代码示例来源:origin: br.com.jarch/jarch-apt

@Override
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
  roundEnv
      .getElementsAnnotatedWithAny(Set.of(JArchSearchField.class, JArchSearchField.List.class))
      .stream()
      .forEach(element -> validSearchField(element));
  return false;
}

代码示例来源:origin: br.com.jarch/jarch-apt

@Override
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
  roundEnv
      .getElementsAnnotatedWithAny(Set.of(JArchAutoIncrement.class))
      .stream()
      .forEach(element -> validTypeField(processingEnv, element));
  return false;
}

代码示例来源:origin: br.com.jarch/jarch-apt

@Override
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnv) {
  roundEnv
      .getElementsAnnotatedWithAny(Set.of(JArchValidPeriod.class, JArchValidPeriod.List.class))
      .forEach(element -> validPeriod(element));
  return false;
}

代码示例来源:origin: br.com.jarch/jarch-apt

@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
  ProcessorUtils.processingEnvironment = processingEnv;
  roundEnv
      .getElementsAnnotatedWithAny(Set.of(JArchGenerateLogicCrud.class, JArchGenerateLogicCrud.List.class))
      .stream()
      .forEach(element -> new LogicCrud(processingEnv, element).generate());
  return false;
}

代码示例来源:origin: br.com.jarch/jarch-apt

@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
  ProcessorUtils.processingEnvironment = processingEnv;
  roundEnv
      .getElementsAnnotatedWithAny(Set.of(JArchGenerateLogicMasterSubDetail.class, JArchGenerateLogicMasterSubDetail.List.class))
      .stream()
      .forEach(element -> new LogicMasterDetailSubDetail(processingEnv, element).generate());
  return false;
}

代码示例来源:origin: no.ssb.lds/linked-data-store-persistence-provider-test

public static TestSpecificationElement arrayNode(String name, TestSpecificationElement items) {
  TestSpecificationElement arrayNode = new TestSpecificationElement(name, SpecificationElementType.EMBEDDED, Set.of("array"), List.of(), Set.of(), Map.of(), items);
  items.parent(arrayNode);
  return arrayNode;
}

相关文章