001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.commons.configuration2.builder; 018 019import java.util.Map; 020 021/** 022 * <p> 023 * A specialized parameters class for INI configuration. 024 * </p> 025 * <p> 026 * This parameters class defines some properties which allow customizing the 027 * parsing and writing of INI documents. 028 * </p> 029 * <p> 030 * This class is not thread-safe. It is intended that an instance is constructed 031 * and initialized by a single thread during configuration of a 032 * {@code ConfigurationBuilder}. 033 * </p> 034 * 035 * @since 2.2 036 */ 037public class INIBuilderParametersImpl extends HierarchicalBuilderParametersImpl 038 implements INIBuilderProperties<INIBuilderParametersImpl> 039{ 040 /** The key for the separatorUsedInINIOutput property. */ 041 private static final String PROP_SEPARATOR_USED_IN_INI_OUTPUT 042 = "separatorUsedInOutput"; 043 044 @Override 045 public void inheritFrom(Map<String, ?> source) 046 { 047 super.inheritFrom(source); 048 copyPropertiesFrom(source, PROP_SEPARATOR_USED_IN_INI_OUTPUT); 049 } 050 051 @Override 052 public INIBuilderParametersImpl setSeparatorUsedInOutput(String separator) 053 { 054 storeProperty(PROP_SEPARATOR_USED_IN_INI_OUTPUT, separator); 055 return this; 056 } 057}