All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.phoebus.logbook.PropertyImpl Maven / Gradle / Ivy

The newest version!
package org.phoebus.logbook;

import java.util.Collections;
import java.util.Map;

/**
 * A default implementation of {@link Property}
 * 
 * @author Kunal Shroff
 *
 */
public class PropertyImpl implements Property {
    private final String name;
    private final Map attributes;

    private PropertyImpl(String name, Map attributes) {
        super();
        this.name = name;
        this.attributes = attributes;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public Map getAttributes() {
        return this.attributes;
    }

    /**
     * Create a new instance of the default implementation of the {@link Property} interface with the given name and attributes
     * @param name - property name
     * @param attributes - property attributes
     * @return a {@link Property} with the given name and attributes
     */
    public static Property of(String name, Map attributes) {
        return new PropertyImpl(name, attributes);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy