List of usage examples for java.util LinkedHashSet LinkedHashSet
public LinkedHashSet(Collection<? extends E> c)
From source file:io.fabric8.spring.boot.converters.ServiceConverter.java
@Override public Set<ConvertiblePair> getConvertibleTypes() { return new LinkedHashSet<>(Arrays.asList(new ConvertiblePair(Service.class, String.class), new ConvertiblePair(Service.class, URL.class))); }
From source file:org.apereo.services.persondir.support.xml.XmlPersonAttributeDaoTest.java
public void testAvailableAttributes() { final Set<String> expectedAttributes = new LinkedHashSet<>( Arrays.asList("username", "givenName", "familyName", "email", "sisID", "portalId", "emplid")); final Set<String> availableQueryAttributes = this.xmlPersonAttributeDao.getAvailableQueryAttributes(); assertEquals(expectedAttributes, availableQueryAttributes); final Set<String> possibleUserAttributeNames = this.xmlPersonAttributeDao.getPossibleUserAttributeNames(); assertEquals(expectedAttributes, possibleUserAttributeNames); }
From source file:com.eventsourcing.index.NavigableIndexTest.java
public static <A> Set<A> setOf(A... values) { return new LinkedHashSet<>(Arrays.asList(values)); }
From source file:net.solarnetwork.central.dras.support.UserRoleConstraintValidator.java
@Override public void initialize(ValidUserRole constraint) { if (validRoles == null) { validRoles = new LinkedHashSet<String>(10); Set<UserRole> availableRoles = userBiz.getAllUserRoles(); for (UserRole role : availableRoles) { validRoles.add(role.getId()); }//ww w.java 2 s . c o m } }
From source file:org.openmrs.module.emrapi.encounter.EmrOrderServiceImpl_1_11.java
@Override public void save(List<EncounterTransaction.DrugOrder> drugOrders, Encounter encounter) { //TODO: setOrders method can be removed. encounter.setOrders(new LinkedHashSet<org.openmrs.Order>(encounter.getOrders())); for (EncounterTransaction.DrugOrder drugOrder : drugOrders) { DrugOrder omrsDrugOrder = openMRSDrugOrderMapper.map(drugOrder, encounter); encounter.addOrder(omrsDrugOrder); }/*from ww w. jav a 2 s . c o m*/ encounterService.saveEncounter(encounter); }
From source file:com.mitchellbosecke.pebble.spring.context.Beans.java
@Override public Set<String> keySet() { return new LinkedHashSet<String>(Arrays.asList(this.ctx.getBeanDefinitionNames())); }
From source file:com.joyent.manta.http.MantaSSLConnectionSocketFactory.java
/** * Creates a new instance using the configuration parameters. * @param config configuration context containing SSL config params *///from w w w. ja v a 2 s .c o m public MantaSSLConnectionSocketFactory(final ConfigContext config) { super(buildContext(), MantaUtils.csv2array(config.getHttpsProtocols()), MantaUtils.csv2array(config.getHttpsCipherSuites()), getDefaultHostnameVerifier()); if (config.getHttpsProtocols() != null) { this.supportedProtocols = new LinkedHashSet<>(MantaUtils.fromCsv(config.getHttpsProtocols())); } else { this.supportedProtocols = Collections.emptySet(); } if (config.getHttpsCipherSuites() != null) { this.supportedCipherSuites = new LinkedHashSet<>(MantaUtils.fromCsv(config.getHttpsCipherSuites())); } else { this.supportedCipherSuites = Collections.emptySet(); } }
From source file:org.bremersee.common.spring.autoconfigure.JaxbAutoConfiguration.java
private static Set<String> createPackageSet(Collection<String> packages) { final Set<String> packageSet = new LinkedHashSet<>(Arrays.asList(DEFAULT_JAXB_CONTEXT_PATHS)); if (packages != null) { packageSet.addAll(packages);/*ww w.j a va 2 s .c o m*/ } return packageSet; }
From source file:com.github.jknack.amd4j.Amd4jMojo.java
@Override public final void execute() throws MojoExecutionException, MojoFailureException { String basedir = System.getProperty("user.dir"); Amd4j amd4j = new Amd4j().with(new TextTransformer()).with(new FileResourceLoader(new File(basedir))); for (String name : new LinkedHashSet<String>(asList(names))) { execute(amd4j, basedir, name);/*from w w w . j a va 2 s .com*/ } }
From source file:cz.cas.lib.proarc.authentication.Authenticators.java
public List<Authenticator> getAuthenticators() { List<Object> authenticatorIds = conf.getList(PROPERTY_AUTHENTICATORS); LinkedHashSet<Object> ids = new LinkedHashSet<Object>(authenticatorIds); // ensure the ProArc authenticator used as a last resort ids.remove(TYPE_PROARC);//from w w w . j av a 2 s. c om ids.add(TYPE_PROARC); ArrayList<Authenticator> authenticators = new ArrayList<Authenticator>(ids.size()); for (Object id : ids) { if (TYPE_PROARC.equals(id)) { authenticators.add(new ProArcAuthenticator()); } else if (TYPE_DESA.equals(id)) { authenticators.add(new DESAAuthenticator()); } else { LOG.warning("Unknown authenticator: " + id); } } return authenticators; }