/** * Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Eike Stepper - initial API and implementation */ package org.eclipse.net4j.util.om.pref; import org.eclipse.net4j.util.event.INotifier; import org.eclipse.net4j.util.om.OMBundle; /** * @author Eike Stepper */ public interface OMPreferences extends INotifier { public static final boolean DEFAULT_BOOLEAN = false; public static final int DEFAULT_INTEGER = 0; public static final long DEFAULT_LONG = 0L; public static final float DEFAULT_FLOAT = 0.0f; public static final double DEFAULT_DOUBLE = 0.0d; public static final String DEFAULT_STRING = ""; //$NON-NLS-1$ public static final String[] DEFAULT_ARRAY = {}; public static final byte[] DEFAULT_BYTES = {}; public OMBundle getBundle(); public boolean isDirty(); public void save(); public OMPreference init(String name, boolean defaultValue); public OMPreference init(String name, int defaultValue); public OMPreference init(String name, long defaultValue); public OMPreference init(String name, float defaultValue); public OMPreference init(String name, double defaultValue); public OMPreference init(String name, String defaultValue); public OMPreference init(String name, String[] defaultValue); public OMPreference init(String name, byte[] defaultValue); public OMPreference initBoolean(String name); public OMPreference initInteger(String name); public OMPreference initLong(String name); public OMPreference initFloat(String name); public OMPreference initDouble(String name); public OMPreference initString(String name); public OMPreference initArray(String name); public OMPreference initBytes(String name); public boolean contains(String name); public OMPreference get(String name); public OMPreference getBoolean(String name); public OMPreference getInteger(String name); public OMPreference getLong(String name); public OMPreference getFloat(String name); public OMPreference getDouble(String name); public OMPreference getString(String name); public OMPreference getArray(String name); public OMPreference getBytes(String name); }