Java Properties setProperty(Properties props, String keyword, Object value)

Here you can find the source of setProperty(Properties props, String keyword, Object value)

Description

set Property

License

Open Source License

Declaration

public static void setProperty(Properties props, String keyword,
            Object value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    public static void setProperty(Properties props, String keyword,
            Object value) {/*from w  w  w.  j  av a 2  s  . c o m*/
        if (props != null) {
            String s = (value != null ? value.toString() : null);
            props.setProperty(keyword, s != null ? s : "");
        }
    }

    public static void setProperty(Properties props, String keyword,
            boolean value) {
        if (props != null)
            props.setProperty(keyword, Boolean.toString(value));
    }
}

Related

  1. putAll(final Map props, final Properties p)
  2. putAll(Properties properties, Map result)
  3. putPrefixToProperties(String prefix, Properties pro)
  4. removeDots(Properties props)
  5. search(List properties, String term)
  6. stringPropertyNames(Properties props, String prefix)
  7. stringToProperties(String str)
  8. toProperties(Map parse)
  9. transformPropertiesToParams(Map properties)