/** * Gets the properties of this BlockType. * * @return the properties */ public List<? extends Property<?>> getProperties() { return ImmutableList.copyOf(this.getPropertyMap().values()); }
/** * Gets a property by name. * * @param name The name * @return The property */ public <V> Property<V> getProperty(String name) { // Assume it works, CCE later at runtime if not. @SuppressWarnings("unchecked") Property<V> property = (Property<V>) getPropertyMap().get(name); checkArgument(property != null, "%s has no property named %s", this, name); return property; }
Property<Object> propertyKey = (Property<Object>) state.getBlockType().getPropertyMap().get(parts[0]); if (propertyKey == null) { throw new NoMatchException("Unknown state " + parts[0] + " for block " + state.getBlockType().getName());