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

How to use
checkType
method
in
java.util.Collections

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

origin: robovm/robovm

@Override public V put(K key, V value) {
  return m.put(checkType(key, keyType), checkType(value, valueType));
}
origin: robovm/robovm

@Override public boolean add(E obj) {
  return c.add(checkType(obj, type));
}
origin: robovm/robovm

@Override public void set(E obj) {
  i.set(checkType(obj, type));
}
origin: robovm/robovm

@Override public void add(int index, E obj) {
  l.add(index, checkType(obj, type));
}
origin: robovm/robovm

  @Override public void add(E obj) {
    i.add(checkType(obj, type));
  }
}
origin: robovm/robovm

@Override public E set(int index, E obj) {
  return l.set(index, checkType(obj, type));
}
origin: robovm/robovm

@Override public V setValue(V obj) {
  return e.setValue(checkType(obj, valueType));
}
origin: robovm/robovm

@SuppressWarnings("unchecked")
@Override public boolean addAll(Collection<? extends E> c1) {
  Object[] array = c1.toArray();
  for (Object o : array) {
    checkType(o, type);
  }
  return c.addAll((List<E>) Arrays.asList(array));
}
origin: robovm/robovm

@SuppressWarnings("unchecked")
@Override public boolean addAll(int index, Collection<? extends E> c1) {
  Object[] array = c1.toArray();
  for (Object o : array) {
    checkType(o, type);
  }
  return l.addAll(index, (List<E>) Arrays.asList(array));
}
origin: robovm/robovm

@SuppressWarnings("unchecked")
@Override public void putAll(Map<? extends K, ? extends V> map) {
  int size = map.size();
  if (size == 0) {
    return;
  }
  Map.Entry<? extends K, ? extends V>[] entries = new Map.Entry[size];
  Iterator<? extends Map.Entry<? extends K, ? extends V>> it = map
      .entrySet().iterator();
  for (int i = 0; i < size; i++) {
    Map.Entry<? extends K, ? extends V> e = it.next();
    checkType(e.getKey(), keyType);
    checkType(e.getValue(), valueType);
    entries[i] = e;
  }
  for (int i = 0; i < size; i++) {
    m.put(entries[i].getKey(), entries[i].getValue());
  }
}
origin: com.mobidevelop.robovm/robovm-rt

  @Override public void add(E obj) {
    i.add(checkType(obj, type));
  }
}
origin: MobiVM/robovm

@Override public E set(int index, E obj) {
  return l.set(index, checkType(obj, type));
}
origin: ibinti/bugvm

@SuppressWarnings("unchecked")
@Override public boolean addAll(int index, Collection<? extends E> c1) {
  Object[] array = c1.toArray();
  for (Object o : array) {
    checkType(o, type);
  }
  return l.addAll(index, (List<E>) Arrays.asList(array));
}
origin: MobiVM/robovm

@SuppressWarnings("unchecked")
@Override public boolean addAll(Collection<? extends E> c1) {
  Object[] array = c1.toArray();
  for (Object o : array) {
    checkType(o, type);
  }
  return c.addAll((List<E>) Arrays.asList(array));
}
origin: ibinti/bugvm

@SuppressWarnings("unchecked")
@Override public boolean addAll(Collection<? extends E> c1) {
  Object[] array = c1.toArray();
  for (Object o : array) {
    checkType(o, type);
  }
  return c.addAll((List<E>) Arrays.asList(array));
}
origin: com.mobidevelop.robovm/robovm-rt

@SuppressWarnings("unchecked")
@Override public boolean addAll(int index, Collection<? extends E> c1) {
  Object[] array = c1.toArray();
  for (Object o : array) {
    checkType(o, type);
  }
  return l.addAll(index, (List<E>) Arrays.asList(array));
}
origin: com.mobidevelop.robovm/robovm-rt

@SuppressWarnings("unchecked")
@Override public boolean addAll(Collection<? extends E> c1) {
  Object[] array = c1.toArray();
  for (Object o : array) {
    checkType(o, type);
  }
  return c.addAll((List<E>) Arrays.asList(array));
}
origin: com.bugvm/bugvm-rt

@SuppressWarnings("unchecked")
@Override public boolean addAll(int index, Collection<? extends E> c1) {
  Object[] array = c1.toArray();
  for (Object o : array) {
    checkType(o, type);
  }
  return l.addAll(index, (List<E>) Arrays.asList(array));
}
origin: com.jtransc/jtransc-rt

@SuppressWarnings("unchecked")
@Override public boolean addAll(int index, Collection<? extends E> c1) {
  Object[] array = c1.toArray();
  for (Object o : array) {
    checkType(o, type);
  }
  return l.addAll(index, (List<E>) Arrays.asList(array));
}
origin: MobiVM/robovm

@SuppressWarnings("unchecked")
@Override public boolean addAll(int index, Collection<? extends E> c1) {
  Object[] array = c1.toArray();
  for (Object o : array) {
    checkType(o, type);
  }
  return l.addAll(index, (List<E>) Arrays.asList(array));
}
java.utilCollectionscheckType

Javadoc

Checks if specified object is instance of specified class. Used for a dynamically typesafe view of the collections.

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

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Top 12 Jupyter Notebook extensions
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