Tabnine Logo
PersistentSet
Code IndexAdd Tabnine to your IDE (free)

How to use
PersistentSet
in
com.oath.cyclops.types.persistent

Best Java code snippets using com.oath.cyclops.types.persistent.PersistentSet (Showing top 20 results out of 315)

origin: aol/micro-server

public Class[] classes() {
    return springBuilder.classes(config, classes.stream().toArray(i->new Class[classes.size()]));
}
origin: aol/micro-server

public SpringContextFactory(Config config, Class<?> c, Set<Class<?>> classes) {
  PersistentSet<Class> s = config.getClasses()
          .plusAll(classes);
  s= s.plus(c);
  Microserver microserver = c.getAnnotation(Microserver.class);
  final PersistentSet<Class> immutableS = s;
  s = Optional.ofNullable(microserver)
        .flatMap(ms -> Optional.ofNullable(ms.blacklistedClasses()))
        .map(bl -> {
          Set<Class> blacklistedClasses = Arrays.stream(bl)
                             .collect(Collectors.toSet());
          return (PersistentSet<Class>)immutableS.stream()
                   .filter(clazz -> !blacklistedClasses.contains(clazz)).hashSet();
        })
        .orElse(immutableS);
  this.classes = s;
  this.config = config;
  springBuilder = ReactiveSeq.fromStream(PluginLoader.INSTANCE.plugins.get()
                                    .stream())
                .filter(m -> m.springBuilder() != null)
                .map(Plugin::springBuilder)
                .findFirst()
                .orElse(new SpringApplicationConfigurator());
}
origin: aol/micro-server

public SpringContextFactory(SpringBuilder builder, Config config, Class<?> c, Set<Class<?>> classes) {
  PersistentSet<Class> s = config.getClasses();
  for(Class next : classes){
    s = s.plus(next);
  }
  s = s.plus(c);
  Microserver microserver = c.getAnnotation(Microserver.class);
  final PersistentSet<Class> immutableS = s;
  s = Optional.ofNullable(microserver)
        .flatMap(ms -> Optional.ofNullable(ms.blacklistedClasses()))
        .map(bl -> {
          Set<Class> blacklistedClasses = Arrays.stream(bl)
                             .collect(Collectors.toSet());
          PersistentSet<Class> rs = immutableS.stream()
                   .filter(clazz -> !blacklistedClasses.contains(clazz))
                    .hashSet();
          return rs;
        })
        .orElse(immutableS);
  this.classes = s;
  this.config = config;
  springBuilder = builder;
}
origin: aol/cyclops

@Override
public boolean equals(Object o) {
  if(!(o instanceof PersistentSet) || o==null)
    return false;
  PersistentSet s = (PersistentSet)o;
  for(T next : this){
    if(!s.containsValue(next))
      return false;
  }
  return size()==s.size();
}
origin: aol/cyclops

@Override
public Object[] toArray() {
 return host.stream().toArray();
}
origin: aol/cyclops

@Override
public int size() {
 return host.size();
}
origin: aol/micro-server

public Config withClassesArray(Class... classes) {
  PersistentSet<Class> org = this.classes;
  for (Class c : classes)
    org = org.plus(c);
  return this.withClasses(org);
}
origin: aol/cyclops

@Override
public Iterator<T> iterator() {
 return host.iterator();
}
origin: aol/cyclops

@Override
public boolean contains(Object o) {
 return host.containsValue((T)o);
}
origin: aol/cyclops

@Override
public boolean isEmpty() {
 return host.isEmpty();
}
origin: aol/cyclops

@Override
public boolean equals(Object o) {
  if(!(o instanceof PersistentSet) || o==null)
    return false;
  PersistentSet s = (PersistentSet)o;
  for(T next : this){
    if(!s.containsValue(next))
      return false;
  }
  return size()==s.size();
}
origin: com.oath.microservices/micro-core

public SpringContextFactory(SpringBuilder builder, Config config, Class<?> c, Set<Class<?>> classes) {
  PersistentSet<Class> s = config.getClasses();
  for(Class next : classes){
    s = s.plus(next);
  }
  s = s.plus(c);
  Microserver microserver = c.getAnnotation(Microserver.class);
  final PersistentSet<Class> immutableS = s;
  s = Optional.ofNullable(microserver)
        .flatMap(ms -> Optional.ofNullable(ms.blacklistedClasses()))
        .map(bl -> {
          Set<Class> blacklistedClasses = Arrays.stream(bl)
                             .collect(Collectors.toSet());
          PersistentSet<Class> rs = immutableS.stream()
                   .filter(clazz -> !blacklistedClasses.contains(clazz))
                    .hashSet();
          return rs;
        })
        .orElse(immutableS);
  this.classes = s;
  this.config = config;
  springBuilder = builder;
}
origin: com.oath.cyclops/cyclops

@Override
public Object[] toArray() {
 return host.stream().toArray();
}
origin: com.oath.cyclops/cyclops

@Override
public int size() {
 return host.size();
}
origin: com.oath.microservices/micro-core

public Config withClassesArray(Class... classes) {
  PersistentSet<Class> org = this.classes;
  for (Class c : classes)
    org = org.plus(c);
  return this.withClasses(org);
}
origin: com.oath.cyclops/cyclops

@Override
public Iterator<T> iterator() {
 return host.iterator();
}
origin: com.oath.cyclops/cyclops

@Override
public boolean contains(Object o) {
 return host.containsValue((T)o);
}
origin: com.oath.cyclops/cyclops

@Override
public boolean isEmpty() {
 return host.isEmpty();
}
origin: aol/micro-server

public ApplicationContext createSpringContext() {
  try {
    ApplicationContext springContext = springBuilder.createSpringApp(config, classes.stream().toArray(i->new Class[classes.size()]));
    return springContext;
  } catch (Exception e) {
    logger.error(InternalErrorCode.STARTUP_FAILED_SPRING_INITIALISATION.toString(), e.getMessage());
    ExceptionSoftener.throwSoftenedException(e);
  }
  return null;
}
public Class[] classes() {
origin: com.oath.cyclops/cyclops

@Override
public boolean equals(Object o) {
  if(!(o instanceof PersistentSet) || o==null)
    return false;
  PersistentSet s = (PersistentSet)o;
  for(T next : this){
    if(!s.containsValue(next))
      return false;
  }
  return size()==s.size();
}
com.oath.cyclops.types.persistentPersistentSet

Most used methods

  • size
  • stream
  • containsValue
  • isEmpty
  • iterator
  • plus
  • plusAll

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JOptionPane (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now