Tabnine Logo
Collections.synchronizedSortedSet
Code IndexAdd Tabnine to your IDE (free)

How to use
synchronizedSortedSet
method
in
java.util.Collections

Best Java code snippets using java.util.Collections.synchronizedSortedSet (Showing top 20 results out of 468)

origin: org.codehaus.groovy/groovy

/**
 * A convenience method for creating a synchronized SortedSet.
 *
 * @param self a SortedSet
 * @return a synchronized SortedSet
 * @see java.util.Collections#synchronizedSortedSet(java.util.SortedSet)
 * @since 1.0
 */
public static <T> SortedSet<T> asSynchronized(SortedSet<T> self) {
  return Collections.synchronizedSortedSet(self);
}
origin: org.apache.commons/commons-collections4

/**
 * Returns a synchronized sorted set backed by the given sorted set.
 * <p>
 * You must manually synchronize on the returned set's iterator to
 * avoid non-deterministic behavior:
 *
 * <pre>
 * Set s = SetUtils.synchronizedSortedSet(mySet);
 * synchronized (s) {
 *     Iterator i = s.iterator();
 *     while (i.hasNext()) {
 *         process (i.next());
 *     }
 * }
 * </pre>
 *
 * This method is just a wrapper for {@link Collections#synchronizedSortedSet(SortedSet)}.
 *
 * @param <E> the element type
 * @param set  the sorted set to synchronize, must not be null
 * @return a synchronized set backed by the given set
 * @throws NullPointerException if the set is null
 */
public static <E> SortedSet<E> synchronizedSortedSet(final SortedSet<E> set) {
  return Collections.synchronizedSortedSet(set);
}
origin: wildfly/wildfly

classes.add(Collections.synchronizedSet(Collections.emptySet()).getClass());
classes.add(Collections.synchronizedSortedMap(Collections.emptySortedMap()).getClass());
classes.add(Collections.synchronizedSortedSet(Collections.emptySortedSet()).getClass());
origin: protostuff/protostuff

synchronizedSortedSet = Collections.synchronizedSortedSet(ts);
synchronizedList = Collections.synchronizedList(ll);
synchronizedRandomAccessList = Collections
origin: spring-projects/spring-batch

final SortedSet<Long> ids = Collections.synchronizedSortedSet(new TreeSet<>()); // TODO Change to SkipList w/JDK6
final AtomicReference<Exception> exception = new AtomicReference<>(null);
origin: apache/geode

boolean sameSizeVarSetFlag = false;
SortedSet testSet =
  Collections.synchronizedSortedSet(new TreeSet(new SelectResultsComparator()));
for (int i = 0; i < 10; i++) {
 Random rand = new Random();
origin: resteasy/Resteasy

sortedParamConverterProviders = Collections.synchronizedSortedSet(parent == null ? new TreeSet<>() : new TreeSet<>(parent.getSortedParamConverterProviders()));
stringParameterUnmarshallers = parent == null ? new ConcurrentHashMap<>() : new ConcurrentHashMap<>(parent.getStringParameterUnmarshallers());
reactiveClasses = parent == null ? new ConcurrentHashMap<>() : new ConcurrentHashMap<>(parent.reactiveClasses);
origin: magro/kryo-serializers

  @Override
  public Object create( final Object sourceCollection ) {
    return Collections.synchronizedSortedSet( (SortedSet<?>) sourceCollection );
  }
},
origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

/**
 * A convenience method for creating a synchronized SortedSet.
 *
 * @param self a SortedSet
 * @return a synchronized SortedSet
 * @see java.util.Collections#synchronizedSortedSet(java.util.SortedSet)
 * @since 1.0
 */
public static <T> SortedSet<T> asSynchronized(SortedSet<T> self) {
  return Collections.synchronizedSortedSet(self);
}
origin: de.javakaffee/kryo-serializers

  @Override
  public Object create( final Object sourceCollection ) {
    return Collections.synchronizedSortedSet( (SortedSet<?>) sourceCollection );
  }
},
origin: org.codehaus.groovy/groovy-all-minimal

/**
 * A convenience method for creating a synchronized SortedSet.
 *
 * @param self a SortedSet
 * @return a synchronized SortedSet
 * @see java.util.Collections#synchronizedSortedSet(java.util.SortedSet)
 */
public static SortedSet asSynchronized(SortedSet self) {
  return Collections.synchronizedSortedSet(self);
}
origin: resteasy/Resteasy

.synchronizedSortedSet(new TreeSet<>(parent.getSortedParamConverterProviders()));
origin: locationtech/geowave

protected SortedSet<MemoryStoreEntry> getRowsForIndex(final String id) {
 SortedSet<MemoryStoreEntry> set = storeData.get(id);
 if (set == null) {
  set = Collections.synchronizedSortedSet(new TreeSet<MemoryStoreEntry>());
  storeData.put(id, set);
 }
 return set;
}
origin: resteasy/Resteasy

.synchronizedSortedSet(new TreeSet<>(parent.getSortedParamConverterProviders()));
origin: org.maltparser/maltparser

protected SortedSet<DependencyNode> getSortedSetOfLeftDependents(int nodeIndex) {
  SortedSet<DependencyNode> leftDependents = Collections.synchronizedSortedSet(new TreeSet<DependencyNode>());
  for (int i = 1; i < nodeIndex; i++) {
    if (nodeIndex == nodes.get(i).getHeadIndex()) {
      leftDependents.add(nodes.get(i));
    }
  }
  return leftDependents;
}
origin: org.maltparser/maltparser

public SortedSet<DependencyNode> getHeads() {
  SortedSet<DependencyNode> heads = Collections.synchronizedSortedSet(new TreeSet<DependencyNode>());
  DependencyNode head = getHead();
  if (head != null) {
    heads.add(head);
  }
  return heads; 
}

origin: org.onap.ccsdk.sli.core/dblib-provider

public SQLExecutionMonitor(SQLExecutionMonitorObserver parent) {
  this.parent = parent;
  completionCounter = new AtomicLong(0L);
  interval = parent.getInterval();
  initialDelay = parent.getInitialDelay();
  this.UNPROCESSED_FAILOVER_THRESHOLD = parent.getUnprocessedFailoverThreshold();
  this.EXPECTED_TIME_TO_COMPLETE = parent.getExpectedCompletionTime() * MILISECOND;
  innerSet = Collections.synchronizedSortedSet(new TreeSet<TestObject>());
  timer = new Timer();
}
origin: SmartDataAnalytics/DL-Learner

  private void reset() {
    // set all values back to their default values (used for running
    // the algorithm more than once)
//        nodes = new TreeSet<OENode>(heuristic);
    searchTree = new SynchronizedSearchTree(heuristic);
    //Sets.synchronizedNavigableSet(new TreeSet<OENode>(Collections.reverseOrder(heuristic)));
    descriptions = Collections.synchronizedSortedSet(new TreeSet<>());
    bestEvaluatedDescriptions.getSet().clear();
    expressionTests = 0;
    highestAccuracy = 0.0;
  }

origin: org.terracotta.modules/tim-tree-map-cache

protected TerracottaTreeCache(int mapImpl) {
  this.mapImpl = mapImpl;
  if (isThreadSafe) {
    cacheTree = Collections.synchronizedSortedMap(new TreeMap<Fqn,Map>(new Fqn()));
    fqnSet = Collections.synchronizedSortedSet(new TreeSet<Fqn>(new Fqn()));
  } else {
    cacheTree = new TreeMap<Fqn,Map>(new Fqn());
    fqnSet = new TreeSet<Fqn>(new Fqn());
  } 
}
origin: org.terracotta.modules/tim-tree-map-cache

protected TerracottaTreeCache(boolean isThreadSafe) {        
  if (isThreadSafe) {
    cacheTree = Collections.synchronizedSortedMap(new TreeMap<Fqn,Map>(new Fqn()));
    fqnSet = Collections.synchronizedSortedSet(new TreeSet<Fqn>(new Fqn()));
  } else {
    cacheTree = new TreeMap<Fqn,Map>(new Fqn());
    fqnSet = new TreeSet<Fqn>(new Fqn());
  }
}
java.utilCollectionssynchronizedSortedSet

Javadoc

Returns a wrapper on the specified sorted set which synchronizes all access to the sorted set.

Popular methods of Collections

  • emptyList
    Returns the empty list (immutable). This list is serializable.This example illustrates the type-safe
  • sort
  • singletonList
    Returns an immutable list containing only the specified object. The returned list is serializable.
  • unmodifiableList
    Returns an unmodifiable view of the specified list. This method allows modules to provide users with
  • emptyMap
    Returns the empty map (immutable). This map is serializable.This example illustrates the type-safe w
  • emptySet
    Returns the empty set (immutable). This set is serializable. Unlike the like-named field, this metho
  • unmodifiableMap
    Returns an unmodifiable view of the specified map. This method allows modules to provide users with
  • singleton
    Returns an immutable set containing only the specified object. The returned set is serializable.
  • unmodifiableSet
    Returns an unmodifiable view of the specified set. This method allows modules to provide users with
  • singletonMap
    Returns an immutable map, mapping only the specified key to the specified value. The returned map is
  • addAll
    Adds all of the specified elements to the specified collection. Elements to be added may be specifie
  • reverse
    Reverses the order of the elements in the specified list. This method runs in linear time.
  • addAll,
  • reverse,
  • unmodifiableCollection,
  • shuffle,
  • enumeration,
  • list,
  • synchronizedMap,
  • synchronizedList,
  • reverseOrder,
  • emptyIterator

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • CodeWhisperer alternatives
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