Skip to main content
summaryrefslogtreecommitdiffstats
blob: 26b0ab2472ffda010a3c578a4739493dd526fd6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/**
 * Copyright (c) 2004 - 2010 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<Boolean> init(String name, boolean defaultValue);

  public OMPreference<Integer> init(String name, int defaultValue);

  public OMPreference<Long> init(String name, long defaultValue);

  public OMPreference<Float> init(String name, float defaultValue);

  public OMPreference<Double> init(String name, double defaultValue);

  public OMPreference<String> init(String name, String defaultValue);

  public OMPreference<String[]> init(String name, String[] defaultValue);

  public OMPreference<byte[]> init(String name, byte[] defaultValue);

  public OMPreference<Boolean> initBoolean(String name);

  public OMPreference<Integer> initInteger(String name);

  public OMPreference<Long> initLong(String name);

  public OMPreference<Float> initFloat(String name);

  public OMPreference<Double> initDouble(String name);

  public OMPreference<String> initString(String name);

  public OMPreference<String[]> initArray(String name);

  public OMPreference<byte[]> initBytes(String name);

  public boolean contains(String name);

  public OMPreference<?> get(String name);

  public OMPreference<Boolean> getBoolean(String name);

  public OMPreference<Integer> getInteger(String name);

  public OMPreference<Long> getLong(String name);

  public OMPreference<Float> getFloat(String name);

  public OMPreference<Double> getDouble(String name);

  public OMPreference<String> getString(String name);

  public OMPreference<String[]> getArray(String name);

  public OMPreference<byte[]> getBytes(String name);
}

Back to the top