    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
    019/**
    020 * <p>
    021 * Definition of a parameters interface for INI configurations.
    022 * </p>
    023 * <p>
    024 * The {@code INIConfiguration} class defines a bunch of additional properties related to INI processing.
    025 * </p>
    026 * <p>
    027 * <strong>Important note:</strong> This interface is not intended to be implemented by client code! It defines a set of
    028 * available properties and may be extended even in minor releases.
    029 * </p>
    030 *
    031 * @since 2.2
    032 * @param <T> the type of the result of all set methods for method chaining
    033 */
    034public interface INIBuilderProperties<T> {
    035
    036    /**
    037     * Allows setting the leading comment separator which is used in reading an INI file.
    038     *
    039     * @param separator String of the new separator for INI reading
    040     * @return a reference to this object for method chaining
    041     * @since 2.5
    042     */
    043    default T setCommentLeadingCharsUsedInInput(final String separator) {
    044        // NoOp
    045        return (T) this;
    046    }
    047
    048    /**
    049     * Allows setting the key and value separator which is used in reading an INI file.
    050     *
    051     * @param separator String of the new separator for INI reading
    052     * @return a reference to this object for method chaining
    053     * @since 2.5
    054     */
    055    default T setSeparatorUsedInInput(final String separator) {
    056        // NoOp
    057        return (T) this;
    058    }
    059
    060    /**
    061     * Allows setting the separator between key and value to be used when writing an INI file.
    062     *
    063     * @param separator the new separator for INI output
    064     * @return a reference to this object for method chaining
    065     */
    066    T setSeparatorUsedInOutput(String separator);
    067}