@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof PropertyValue)) return false; PropertyValue that = (PropertyValue) o; return Objects.equals(getKey(), that.getKey()) && Objects.equals(getValue(), that.getValue()) && Objects.equals(getSource(), that.getSource()) && Objects.equals(getMetaEntries(), that.getMetaEntries()); }
@Override public int hashCode() { return Objects.hash(getKey(), getValue(), getSource(), getMetaEntries()); }
/** * Get the current properties, composed by the loaded {@link PropertySource} and filtered * by registered {@link org.apache.tamaya.spi.PropertyFilter}. * * @return the final properties. */ @Override public Map<String, String> getProperties() { Map<String, PropertyValue> filtered = PropertyFiltering.applyFilters( configEvaluator.evaluateRawValues(configurationContext), configurationContext); Map<String,String> result = new HashMap<>(); for(PropertyValue val:filtered.values()){ if(val.getValue()!=null) { result.put(val.getKey(), val.getValue()); // TODO: Discuss metadata handling... result.putAll(val.getMetaEntries()); } } return result; }
/** * Get the current properties, composed by the loaded {@link PropertySource} and filtered * by registered {@link PropertyFilter}. * * @return the final properties. */ @Override public Map<String, String> getProperties() { Map<String, PropertyValue> filtered = PropertyFiltering.applyFilters( configEvaluator.evaluateRawValues(configurationContext), configurationContext); Map<String,String> result = new HashMap<>(); for(PropertyValue val:filtered.values()){ if(val.getValue()!=null) { result.put(val.getKey(), val.getValue()); // TODO: Discuss metadata handling... result.putAll(val.getMetaEntries()); } } return result; }