Tabnine Logo
Collections$CheckedSet
Code IndexAdd Tabnine to your IDE (free)

How to use
Collections$CheckedSet
in
java.util

Best Java code snippets using java.util.Collections$CheckedSet (Showing top 10 results out of 315)

origin: jtulach/bck2brwsr

/**
 * Returns a dynamically typesafe view of the specified set.
 * Any attempt to insert an element of the wrong type will result in
 * an immediate {@link ClassCastException}.  Assuming a set contains
 * no incorrectly typed elements prior to the time a dynamically typesafe
 * view is generated, and that all subsequent access to the set
 * takes place through the view, it is <i>guaranteed</i> that the
 * set cannot contain an incorrectly typed element.
 *
 * <p>A discussion of the use of dynamically typesafe views may be
 * found in the documentation for the {@link #checkedCollection
 * checkedCollection} method.
 *
 * <p>The returned set will be serializable if the specified set is
 * serializable.
 *
 * <p>Since {@code null} is considered to be a value of any reference
 * type, the returned set permits insertion of null elements whenever
 * the backing set does.
 *
 * @param s the set for which a dynamically typesafe view is to be
 *          returned
 * @param type the type of element that {@code s} is permitted to hold
 * @return a dynamically typesafe view of the specified set
 * @since 1.5
 */
public static <E> Set<E> checkedSet(Set<E> s, Class<E> type) {
  return new CheckedSet<>(s, type);
}
origin: org.apidesign.bck2brwsr/emul

/**
 * Returns a dynamically typesafe view of the specified set.
 * Any attempt to insert an element of the wrong type will result in
 * an immediate {@link ClassCastException}.  Assuming a set contains
 * no incorrectly typed elements prior to the time a dynamically typesafe
 * view is generated, and that all subsequent access to the set
 * takes place through the view, it is <i>guaranteed</i> that the
 * set cannot contain an incorrectly typed element.
 *
 * <p>A discussion of the use of dynamically typesafe views may be
 * found in the documentation for the {@link #checkedCollection
 * checkedCollection} method.
 *
 * <p>The returned set will be serializable if the specified set is
 * serializable.
 *
 * <p>Since {@code null} is considered to be a value of any reference
 * type, the returned set permits insertion of null elements whenever
 * the backing set does.
 *
 * @param s the set for which a dynamically typesafe view is to be
 *          returned
 * @param type the type of element that {@code s} is permitted to hold
 * @return a dynamically typesafe view of the specified set
 * @since 1.5
 */
public static <E> Set<E> checkedSet(Set<E> s, Class<E> type) {
  return new CheckedSet<>(s, type);
}
origin: FlexoVM/flexovm

/**
 * Returns a dynamically typesafe view of the specified set. Trying to
 * insert an element of the wrong type into this set throws a
 * {@code ClassCastException}. At creation time the types in {@code s} are
 * not checked for correct type.
 *
 * @param s
 *            the set to be wrapped in a typesafe set.
 * @param type
 *            the type of the elements permitted to insert.
 * @return a typesafe set.
 */
public static <E> Set<E> checkedSet(Set<E> s, Class<E> type) {
  return new CheckedSet<E>(s, type);
}
origin: com.bugvm/bugvm-rt

/**
 * Returns a dynamically typesafe view of the specified set. Trying to
 * insert an element of the wrong type into this set throws a
 * {@code ClassCastException}. At creation time the types in {@code s} are
 * not checked for correct type.
 *
 * @param s
 *            the set to be wrapped in a typesafe set.
 * @param type
 *            the type of the elements permitted to insert.
 * @return a typesafe set.
 */
public static <E> Set<E> checkedSet(Set<E> s, Class<E> type) {
  return new CheckedSet<E>(s, type);
}
origin: com.gluonhq/robovm-rt

/**
 * Returns a dynamically typesafe view of the specified set. Trying to
 * insert an element of the wrong type into this set throws a
 * {@code ClassCastException}. At creation time the types in {@code s} are
 * not checked for correct type.
 *
 * @param s
 *            the set to be wrapped in a typesafe set.
 * @param type
 *            the type of the elements permitted to insert.
 * @return a typesafe set.
 */
public static <E> Set<E> checkedSet(Set<E> s, Class<E> type) {
  return new CheckedSet<E>(s, type);
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Returns a dynamically typesafe view of the specified set. Trying to
 * insert an element of the wrong type into this set throws a
 * {@code ClassCastException}. At creation time the types in {@code s} are
 * not checked for correct type.
 *
 * @param s
 *            the set to be wrapped in a typesafe set.
 * @param type
 *            the type of the elements permitted to insert.
 * @return a typesafe set.
 */
public static <E> Set<E> checkedSet(Set<E> s, Class<E> type) {
  return new CheckedSet<E>(s, type);
}
origin: MobiVM/robovm

/**
 * Returns a dynamically typesafe view of the specified set. Trying to
 * insert an element of the wrong type into this set throws a
 * {@code ClassCastException}. At creation time the types in {@code s} are
 * not checked for correct type.
 *
 * @param s
 *            the set to be wrapped in a typesafe set.
 * @param type
 *            the type of the elements permitted to insert.
 * @return a typesafe set.
 */
public static <E> Set<E> checkedSet(Set<E> s, Class<E> type) {
  return new CheckedSet<E>(s, type);
}
origin: com.jtransc/jtransc-rt

/**
 * Returns a dynamically typesafe view of the specified set. Trying to
 * insert an element of the wrong type into this set throws a
 * {@code ClassCastException}. At creation time the types in {@code s} are
 * not checked for correct type.
 *
 * @param s
 *            the set to be wrapped in a typesafe set.
 * @param type
 *            the type of the elements permitted to insert.
 * @return a typesafe set.
 */
public static <E> Set<E> checkedSet(Set<E> s, Class<E> type) {
  return new CheckedSet<E>(s, type);
}
origin: ibinti/bugvm

/**
 * Returns a dynamically typesafe view of the specified set. Trying to
 * insert an element of the wrong type into this set throws a
 * {@code ClassCastException}. At creation time the types in {@code s} are
 * not checked for correct type.
 *
 * @param s
 *            the set to be wrapped in a typesafe set.
 * @param type
 *            the type of the elements permitted to insert.
 * @return a typesafe set.
 */
public static <E> Set<E> checkedSet(Set<E> s, Class<E> type) {
  return new CheckedSet<E>(s, type);
}
origin: robovm/robovm

/**
 * Returns a dynamically typesafe view of the specified set. Trying to
 * insert an element of the wrong type into this set throws a
 * {@code ClassCastException}. At creation time the types in {@code s} are
 * not checked for correct type.
 *
 * @param s
 *            the set to be wrapped in a typesafe set.
 * @param type
 *            the type of the elements permitted to insert.
 * @return a typesafe set.
 */
public static <E> Set<E> checkedSet(Set<E> s, Class<E> type) {
  return new CheckedSet<E>(s, type);
}
java.utilCollections$CheckedSet

Javadoc

A dynamically typesafe view of a Set.

Most used methods

  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Github Copilot 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