public Collection<MethodLocation> getLocations() { return addressToLocation.valueCollection(); }
public Collection<V> valueCollection() { if ( values == null ) values = Collections.unmodifiableCollection( m.valueCollection() ); return values; } public Object[] values() { return m.values(); }
@Override public boolean isRenderable() { for (Texture texture : textureMap.valueCollection()) { if (!texture.isLoaded()) { return false; } } return true; }
public Collection<V> valueCollection() { synchronized( mutex ) { if ( values == null ) { values = new SynchronizedCollection<V>( m.valueCollection(), mutex ); } return values; } } public Object[] values() {
@Override public List<JDA> asList() { return Collections.unmodifiableList(new ArrayList<>(elements.valueCollection())); }
@Override public Set<JDA> asSet() { return Collections.unmodifiableSet(new HashSet<>(elements.valueCollection())); }
private ProtocolData getProtocolData(int version) { ProtocolData protocol = protocols.get( version ); if ( protocol == null && ( protocolPhase != Protocol.GAME ) ) { protocol = Iterables.getFirst( protocols.valueCollection(), null ); } return protocol; }
public synchronized void shutdown() { if (sendSystem != null) { sendSystem.shutdown(); sendSystem = null; } if (receiveThread != null) { receiveThread.interrupt(); receiveThread = null; } if (combinedAudioExecutor != null) { combinedAudioExecutor.shutdownNow(); combinedAudioExecutor = null; } if (opusEncoder != null) { Opus.INSTANCE.opus_encoder_destroy(opusEncoder); opusEncoder = null; } opusDecoders.valueCollection().forEach(Decoder::close); opusDecoders.clear(); }
@Override public List<JDA> getElementsByName(String name, boolean ignoreCase) { Checks.notEmpty(name, "Name"); if (elements.isEmpty()) return Collections.emptyList(); List<JDA> list = new LinkedList<>(); for (JDA elem : elements.valueCollection()) { String elementName = elem.getShardInfo().getShardString(); if (elementName != null) { if (ignoreCase) { if (elementName.equalsIgnoreCase(name)) list.add(elem); } else { if (elementName.equals(name)) list.add(elem); } } } return list; }
private synchronized void setupReceiveSystem() { if (udpSocket != null && !udpSocket.isClosed() && receiveHandler != null && receiveThread == null) { setupReceiveThread(); } else if (receiveHandler == null && receiveThread != null) { receiveThread.interrupt(); receiveThread = null; if (combinedAudioExecutor != null) { combinedAudioExecutor.shutdownNow(); combinedAudioExecutor = null; } opusDecoders.valueCollection().forEach(Decoder::close); opusDecoders.clear(); } else if (receiveHandler != null && !receiveHandler.canReceiveCombined() && combinedAudioExecutor != null) { combinedAudioExecutor.shutdownNow(); combinedAudioExecutor = null; } }
/** * {@inheritDoc} */ public Collection<Set<Integer>> valueSets() { // An IntSet _is_ a Set<Integer>, but the JVM doesn't recognize // covaraince in the return type generics, so we must cast Collection<?> c = map.valueCollection(); @SuppressWarnings("unchecked") Collection<Set<Integer>> c2 = (Collection<Set<Integer>>)c; return c2; }
/** * {@inheritDoc} */ public Collection<Set<Integer>> valueSets() { // An IntSet _is_ a Set<Integer>, but the JVM doesn't recognize // covaraince in the return type generics, so we must cast Collection<?> c = map.valueCollection(); @SuppressWarnings("unchecked") Collection<Set<Integer>> c2 = (Collection<Set<Integer>>)c; return c2; }
public Collection<V> valueCollection() { if ( values == null ) values = Collections.unmodifiableCollection( m.valueCollection() ); return values; } public Object[] values() { return m.values(); }
public Collection<V> valueCollection() { if ( values == null ) values = Collections.unmodifiableCollection( m.valueCollection() ); return values; } public Object[] values() { return m.values(); }
public Collection<V> valueCollection() { synchronized( mutex ) { if ( values == null ) { values = new SynchronizedCollection<V>( m.valueCollection(), mutex ); } return values; } } public Object[] values() {
/** * {@inheritDoc} */ public void clearEdges() { for (EdgeSet<T> e : vertexToEdges.valueCollection()) e.clear(); numEdges = 0; }
public Collection<V> valueCollection() { synchronized( mutex ) { if ( values == null ) { values = new SynchronizedCollection<V>( m.valueCollection(), mutex ); } return values; } } public Object[] values() {
/** * Unbinds the material from the OpenGL context. */ public void unbind() { if (textures != null) { for (Texture texture : textures.valueCollection()) { texture.unbind(); } } }
/** * {@inheritDoc} */ public Set<TypedEdge<T>> edges(T t) { Set<TypedEdge<T>> edges = new HashSet<TypedEdge<T>>(); for (SparseTypedEdgeSet<T> set : vertexToEdges.valueCollection()) { if (set.types().contains(t)) edges.addAll(set.getEdges(t)); } return edges; }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof CompressedKargerGraph)) return false; CompressedKargerGraph graph = (CompressedKargerGraph) o; if (Double.compare(graph.getSumOfWeights(), getSumOfWeights()) != 0) return false; if (isCutted() != graph.isCutted()) return false; boolean r = mergedTaxa.valueCollection().equals(graph.mergedTaxa.valueCollection()); if (r && hashCode() != graph.hashCode()) throw new RuntimeException("Hash exception!!!!!!!"); return r; }