001
014
015 package com.liferay.portlet;
016
017 import java.io.Serializable;
018
019
022 public class Preference implements Cloneable, Serializable {
023
024 public Preference(String name, String value) {
025 this(name, new String[] {value});
026 }
027
028 public Preference(String name, String value, boolean readOnly) {
029 this(name, new String[] {value}, readOnly);
030 }
031
032 public Preference(String name, String[] values) {
033 this(name, values, false);
034 }
035
036 public Preference(String name, String[] values, boolean readOnly) {
037 _name = name;
038 _values = values;
039 _readOnly = readOnly;
040 }
041
042 public String getName() {
043 return _name;
044 }
045
046 public String[] getValues() {
047 return _values;
048 }
049
050 public void setValues(String[] values) {
051 _values = values;
052 }
053
054 public boolean getReadOnly() {
055 return _readOnly;
056 }
057
058 public boolean isReadOnly() {
059 return _readOnly;
060 }
061
062 public Object clone() {
063 return new Preference(_name, _values, _readOnly);
064 }
065
066 private String _name;
067 private String[] _values;
068 private boolean _readOnly;
069
070 }