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

org.xmind.core.IProperties Maven / Gradle / Ivy

Go to download

Plugin that manages JBehave stories storage in XMind mindmap file, which allows design jBehave tests right after the brainstorm

The newest version!
/* ******************************************************************************
 * Copyright (c) 2006-2012 XMind Ltd. and others.
 * 
 * This file is a part of XMind 3. XMind releases 3 and
 * above are dual-licensed under the Eclipse Public License (EPL),
 * which is available at http://www.eclipse.org/legal/epl-v10.html
 * and the GNU Lesser General Public License (LGPL), 
 * which is available at http://www.gnu.org/licenses/lgpl.html
 * See http://www.xmind.net/license.html for details.
 * 
 * Contributors:
 *     XMind Ltd. - initial API and implementation
 *******************************************************************************/
package org.xmind.core;

import java.util.Iterator;

import org.xmind.core.util.Property;

public interface IProperties {

    /**
     * Gets the value of the property specified by a key.
     * 
     * @param key
     *            a String to identify the property
     * @return the value of the specified property, or null if the
     *         property is not found
     */
    String getProperty(String key);

    /**
     * Gets the value of the property specified by a key. If the property is not
     * found, the default value is returned.
     * 
     * @param key
     *            a String to identify the property
     * @param defaultValue
     *            a default value for non-found properties
     * @return the value of the specified proeprty, or defaultValue
     *         if the property is not found
     */
    String getProperty(String key, String defaultValue);

    /**
     * Sets the value of the property specified by a key, or remove the property
     * if the value is null.
     * 
     * @param key
     *            a String to identify the property
     * @param value
     *            the new value of the specified property, or null
     */
    void setProperty(String key, String value);

    /**
     * Iterates over all properties of this object.
     * 
     * @return an {@link java.util.Iterator} that iterates over all properties of this
     *         object
     */
    Iterator properties();

    /**
     * Gets the number of properties of this object.
     * 
     * @return the number of properties of this object
     */
    int size();

    /**
     * Determines whether this object has any property.
     * 
     * @return true if this object has more than zero properties,
     *         or false if this object has no property
     */
    boolean isEmpty();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy