@Override Spliterator<K> keySpliterator() { return delegate.keySet().spliterator(); }
@Override UnmodifiableIterator<K> keyIterator() { return Iterators.unmodifiableIterator(delegate.keySet().iterator()); }
@Override Spliterator<K> keySpliterator() { return delegate.keySet().spliterator(); }
@Override UnmodifiableIterator<K> keyIterator() { return Iterators.unmodifiableIterator(delegate.keySet().iterator()); }
void applyFilter(final Set<Protocol> enabled, final EnumMap<Protocol, String> supported) { final List<Protocol> clone = new ArrayList<>(supported.keySet()); clone.retainAll(protocols); // it will be in reverse-preference order due to the ordering of the enum Collections.reverse(clone); enabled.addAll(clone); } }
@Override UnmodifiableIterator<K> keyIterator() { return Iterators.unmodifiableIterator(delegate.keySet().iterator()); }
public FbxLayerElement.Type[] getLayerElementTypes() { FbxLayerElement.Type[] types = new FbxLayerElement.Type[references.size()]; references.keySet().toArray(types); return types; }
@Override UnmodifiableIterator<K> keyIterator() { return Iterators.unmodifiableIterator(delegate.keySet().iterator()); }
@Override Spliterator<K> keySpliterator() { return delegate.keySet().spliterator(); }
@NoWarning("WMI_WRONG_MAP_ITERATOR") public void iterateEnumMap(EnumMap<TimeUnit, String> map) { for(TimeUnit u : map.keySet()) { System.out.println(u+": "+map.get(u)); } }
/** * Helper method that can be used to dynamically figure out * enumeration type of given {@link EnumSet}, without having * access to its declaration. * Code is needed to work around design flaw in JDK. */ public static Class<? extends Enum<?>> findEnumType(EnumMap<?,?> m) { if (!m.isEmpty()) { return findEnumType(m.keySet().iterator().next()); } // Otherwise need to locate using an internal field return EnumTypeLocator.instance.enumTypeFor(m); }
/** * Helper method that can be used to dynamically figure out * enumeration type of given {@link EnumSet}, without having * access to its declaration. * Code is needed to work around design flaw in JDK. */ public static Class<? extends Enum<?>> findEnumType(EnumMap<?,?> m) { if (!m.isEmpty()) { return findEnumType(m.keySet().iterator().next()); } // Otherwise need to locate using an internal field return EnumTypeLocator.instance.enumTypeFor(m); }
private void writeShaders(TechniqueDef techniqueDef, OutputStreamWriter out) throws IOException { if (techniqueDef.getShaderProgramNames().size() > 0) { for (Shader.ShaderType shaderType : techniqueDef.getShaderProgramNames().keySet()) { // System.err.println(shaderType + " " +techniqueDef.getShaderProgramNames().get(shaderType) + " " +techniqueDef.getShaderProgramLanguage(shaderType)) out.write(" "); out.write(shaderType.name()); out.write("Shader "); out.write(techniqueDef.getShaderProgramLanguage(shaderType)); out.write(": "); out.write(techniqueDef.getShaderProgramNames().get(shaderType)); out.write("\n"); } out.write("\n"); } }
/** * Helper method that can be used to dynamically figure out * enumeration type of given {@link EnumSet}, without having * access to its declaration. * Code is needed to work around design flaw in JDK. * * @since 1.5 */ public static Class<? extends Enum<?>> findEnumType(EnumMap<?,?> m) { if (!m.isEmpty()) { return findEnumType(m.keySet().iterator().next()); } // Otherwise need to locate using an internal field return EnumTypeLocator.instance.enumTypeFor(m); }
/** * Helper method that can be used to dynamically figure out * enumeration type of given {@link EnumSet}, without having * access to its declaration. * Code is needed to work around design flaw in JDK. */ public static Class<? extends Enum<?>> findEnumType(EnumMap<?,?> m) { if (!m.isEmpty()) { return findEnumType(m.keySet().iterator().next()); } // Otherwise need to locate using an internal field return EnumTypeLocator.instance.enumTypeFor(m); }
/** * Sets the shaders that this technique definition will use. * * @param shaderNames EnumMap containing all shader names for this stage * @param shaderLanguages EnumMap containing all shader languages for this stage */ public void setShaderFile(EnumMap<Shader.ShaderType, String> shaderNames, EnumMap<Shader.ShaderType, String> shaderLanguages) { requiredCaps.clear(); weight = 0; for (Shader.ShaderType shaderType : shaderNames.keySet()) { String language = shaderLanguages.get(shaderType); String shaderFile = shaderNames.get(shaderType); this.shaderLanguages.put(shaderType, language); this.shaderNames.put(shaderType, shaderFile); Caps cap = Caps.valueOf(language); requiredCaps.add(cap); weight = Math.max(weight, cap.ordinal()); if (shaderType.equals(Shader.ShaderType.Geometry)) { requiredCaps.add(Caps.GeometryShader); } else if (shaderType.equals(Shader.ShaderType.TessellationControl)) { requiredCaps.add(Caps.TesselationShader); } } }
Set<StorageType> getStorageTypes() { return storageMap.keySet(); }
public Set<PlayerType> getPlayerTypes() { return playerTypes.keySet(); }
/** * Helper method that can be used to dynamically figure out * enumeration type of given {@link EnumSet}, without having * access to its declaration. * Code is needed to work around design flaw in JDK. * * @since 1.5 */ public static Class<? extends Enum<?>> findEnumType(EnumMap<?,?> m) { if (!m.isEmpty()) { return findEnumType(m.keySet().iterator().next()); } // Otherwise need to locate using an internal field return EnumTypeLocator.instance.enumTypeFor(m); }
private enum NodeNotChosenReason { NOT_IN_SERVICE("the node is not in service"), NODE_STALE("the node is stale"), NODE_TOO_BUSY("the node is too busy"), TOO_MANY_NODES_ON_RACK("the rack has too many chosen nodes"), NOT_ENOUGH_STORAGE_SPACE("not enough storage space to place the block"); private final String text; NodeNotChosenReason(final String logText) { text = logText; } private String getText() { return text; } }