List of usage examples for java.util TreeSet TreeSet
public TreeSet(SortedSet<E> s)
From source file:com.pc.dailymile.domain.Routes.java
public void setFriends(Set<Route> routes) { this.routes = new TreeSet<Route>(routes); }
From source file:com.tvd.tech.spring.batch.JobConfigurationIntegrationTests.java
@Test public void testSimpleProperties() throws Exception { assertNotNull(jobLocator);//from w w w . j av a 2s . co m assertEquals("[jobCsvHeaderSample, csv-partition-sample-job, csv-performance-sample-job, basic-sample-job]", new TreeSet<String>(jobLocator.getJobNames()).toString()); }
From source file:com.gammalabs.wifianalyzer.wifi.band.WiFiChannelCountryGHZ5.java
WiFiChannelCountryGHZ5() { SortedSet<Integer> channelsSet1 = new TreeSet<>(Arrays.asList(36, 40, 44, 48, 52, 56, 60, 64)); SortedSet<Integer> channelsSet2 = new TreeSet<>( Arrays.asList(100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140)); SortedSet<Integer> channelsSet3 = new TreeSet<>(Arrays.asList(149, 153, 157, 161, 165)); SortedSet<Integer> channelsToExcludeCanada = new TreeSet<>(Arrays.asList(120, 124, 128)); SortedSet<Integer> channelsToExcludeIsrael = new TreeSet<>(channelsSet2); channelsToExcludeIsrael.addAll(channelsSet3); channelsToExclude = new HashMap<>(); channelsToExclude.put("AU", channelsToExcludeCanada); // Australia channelsToExclude.put("CA", channelsToExcludeCanada); // Canada channelsToExclude.put("CN", channelsSet2); // China channelsToExclude.put("IL", channelsToExcludeIsrael); // Israel channelsToExclude.put("JP", channelsSet3); // Japan channelsToExclude.put("KR", channelsSet2); // South Korea channelsToExclude.put("TR", channelsSet3); // Turkey channelsToExclude.put("ZA", channelsSet3); // South Africa channels = new TreeSet<>(channelsSet1); channels.addAll(channelsSet2);//from w w w . j a va 2 s . c om channels.addAll(channelsSet3); }
From source file:com.vrem.wifianalyzer.wifi.band.WiFiChannelCountryGHZ2.java
WiFiChannelCountryGHZ2() { countries = new HashSet<>(Arrays.asList("AS", "AU", "CA", "FM", "GU", "MP", "PA", "PR", "UM", "US", "VI")); channels = new TreeSet<>(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)); world = new TreeSet<>(channels); world.add(12);//from w w w.j av a 2 s . co m world.add(13); }
From source file:org.openmrs.module.openhmis.backboneforms.web.controller.FieldGenHandlerController.java
@RequestMapping(method = RequestMethod.GET) @ResponseBody// w w w . j av a 2s . c o m public Map<String, Set<String>> fieldgenhandlers() { Map<String, Set<String>> container = new HashMap<String, Set<String>>(); container.put("results", new TreeSet<String>(FieldGenHandlerFactory.getSingletonInstance().getHandlers().keySet())); return container; }
From source file:com.reactive.hzdfs.dll.JarClassLoader.java
private static TreeSet<String> scanForPackages(String path) throws IOException { try (JarFile file = new JarFile(path)) { TreeSet<String> packages = new TreeSet<>(new Comparator<String>() { @Override/* ww w.j a va 2 s.c om*/ public int compare(String o1, String o2) { if (o2.length() > o1.length() && o2.contains(o1)) return -1; else if (o2.length() < o1.length() && o1.contains(o2)) return 1; else return o1.compareTo(o2); } }); for (Enumeration<JarEntry> entries = file.entries(); entries.hasMoreElements();) { JarEntry entry = entries.nextElement(); String name = entry.getName(); if (name.endsWith(".class")) { String fqcn = ClassUtils.convertResourcePathToClassName(name); fqcn = StringUtils.delete(fqcn, ".class"); packages.add(ClassUtils.getPackageName(fqcn)); } } return packages; } }
From source file:com.gammalabs.wifianalyzer.wifi.band.WiFiChannelCountryGHZ2.java
WiFiChannelCountryGHZ2() { countries = new HashSet<>( Arrays.asList("AS", "AU", "CA", "FM", "GU", "MP", "PA", "PR", "TW", "UM", "US", "VI")); channels = new TreeSet<>(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)); world = new TreeSet<>(channels); world.add(12);/*from w w w.jav a2 s .c o m*/ world.add(13); }
From source file:com.mycsense.carbondb.domain.SingleElement.java
public SingleElement(Dimension keywords, Unit unit) { this.keywords = new TreeSet<>(keywords.keywords); this.unit = unit; groups = new HashSet<>(); }
From source file:com.opengamma.financial.analytics.curve.CurveSpecification.java
public CurveSpecification(final LocalDate curveDate, final String name, final Collection<CurveNodeWithIdentifier> nodes) { ArgumentChecker.notNull(curveDate, "curve date"); ArgumentChecker.notNull(name, "name"); ArgumentChecker.notNull(nodes, "nodes"); _curveDate = curveDate;/*from ww w . j a v a 2 s. c o m*/ _name = name; _nodes = new TreeSet<>(nodes); }
From source file:net.sourceforge.fenixedu.presentationTier.renderers.providers.ThesisExecutionYearsProvider.java
@Override public Object provide(Object source, Object currentValue) { SortedSet<ExecutionYear> result = new TreeSet<ExecutionYear>( new ReverseComparator(ExecutionYear.COMPARATOR_BY_YEAR)); result.addAll(Bennu.getInstance().getExecutionYearsSet()); return result; }