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

com.anysoft.util.JoinProperties Maven / Gradle / Ivy

There is a newer version: 1.6.17
Show newest version
package com.anysoft.util;

import org.apache.commons.lang3.StringUtils;

/**
 * JoinProperties
 */
public class JoinProperties extends DefaultProperties{
    protected Properties left = null;
    protected Properties right = null;

    public JoinProperties(Properties parent){
        super("default",parent);
    }

    public void setLeft(Properties left){
        this.left = left;
    }

    public void setRight(Properties right){
        this.right = right;
    }

    @Override
    protected String _GetValue(String _name) {
        String value = "";
        if (left != null){
            value = PropertiesConstants.getRaw(left,_name,value);
        }
        if (StringUtils.isEmpty(value) && right != null){
            value = PropertiesConstants.getRaw(right,_name,value);
        }

        if (StringUtils.isEmpty(value) && right != null){
            value = super._GetValue(_name);
        }

        return value;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy