/[svn]/jlscp/trunk/src/org/linuxsampler/lscp/ParameterFactory.java
ViewVC logotype

Contents of /jlscp/trunk/src/org/linuxsampler/lscp/ParameterFactory.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 596 - (show annotations) (download)
Wed Jun 1 07:11:31 2005 UTC (18 years, 10 months ago) by iliev
File size: 4461 byte(s)
The first alpha-release of jlscp

1 /*
2 * jlscp - a java LinuxSampler control protocol API
3 *
4 * Copyright (C) 2005 Grigor Kirilov Iliev
5 *
6 * This file is part of jlscp.
7 *
8 * jlscp is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation.
11 *
12 * jlscp is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with jlscp; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23 package org.linuxsampler.lscp;
24
25 /**
26 * This class represents a factory for creating <code>Parameter</code> instances.
27 * @author Grigor Iliev
28 */
29 public class ParameterFactory {
30 private
31 ParameterFactory() {
32
33 }
34
35 /**
36 * Creates a <code>Parameter&lt;Boolean&gt;</code>
37 * instance with the specified name and value.
38 * @param name The parameter name.
39 * @param value The parameter value.
40 * @return The newly created <code>Parameter&lt;Boolean&gt;</code>
41 * instance with the specified name and value.
42 */
43 public static Parameter<Boolean>
44 createParameter(String name, Boolean value) {
45 return new BoolParameter(name, value);
46 }
47
48 /**
49 * Creates a <code>Parameter&lt;Boolean[]&gt;</code>
50 * instance with the specified name and value.
51 * @param name The parameter name.
52 * @param value The parameter value.
53 * @return The newly created <code>Parameter&lt;Boolean[]&gt;</code>
54 * instance with the specified name and value.
55 */
56 public static Parameter<Boolean[]>
57 createParameter(String name, Boolean[] value) {
58 return new BoolListParameter(name, value);
59 }
60
61 /**
62 * Creates a <code>Parameter&lt;Float&gt;</code>
63 * instance with the specified name and value.
64 * @param name The parameter name.
65 * @param value The parameter value.
66 * @return The newly created <code>Parameter&lt;Float&gt;</code>
67 * instance with the specified name and value.
68 */
69 public static Parameter<Float>
70 createParameter(String name, Float value) {
71 return new FloatParameter(name, value);
72 }
73
74 /**
75 * Creates a <code>Parameter&lt;Float[]&gt;</code>
76 * instance with the specified name and value.
77 * @param name The parameter name.
78 * @param value The parameter value.
79 * @return The newly created <code>Parameter&lt;Float[]&gt;</code>
80 * instance with the specified name and value.
81 */
82 public static Parameter<Float[]>
83 createParameter(String name, Float[] value) {
84 return new FloatListParameter(name, value);
85 }
86
87 /**
88 * Creates a <code>Parameter&lt;Integer&gt;</code>
89 * instance with the specified name and value.
90 * @param name The parameter name.
91 * @param value The parameter value.
92 * @return The newly created <code>Parameter&lt;Integer&gt;</code>
93 * instance with the specified name and value.
94 */
95 public static Parameter<Integer>
96 createParameter(String name, Integer value) {
97 return new IntParameter(name, value);
98 }
99
100 /**
101 * Creates a <code>Parameter&lt;Integer[]&gt;</code>
102 * instance with the specified name and value.
103 * @param name The parameter name.
104 * @param value The parameter value.
105 * @return The newly created <code>Parameter&lt;Integer[]&gt;</code>
106 * instance with the specified name and value.
107 */
108 public static Parameter<Integer[]>
109 createParameter(String name, Integer[] value) {
110 return new IntListParameter(name, value);
111 }
112
113 /**
114 * Creates a <code>Parameter&lt;String&gt;</code>
115 * instance with the specified name and value.
116 * @param name The parameter name.
117 * @param value The parameter value.
118 * @return The newly created <code>Parameter&lt;String&gt;</code>
119 * instance with the specified name and value.
120 */
121 public static Parameter<String>
122 createParameter(String name, String value) {
123 return new StringParameter(name, value);
124 }
125
126 /**
127 * Creates a <code>Parameter&lt;String[]&gt;</code>
128 * instance with the specified name and value.
129 * @param name The parameter name.
130 * @param value The parameter value.
131 * @return The newly created <code>Parameter&lt;String[]&gt;</code>
132 * instance with the specified name and value.
133 */
134 public static Parameter<String[]>
135 createParameter(String name, String[] value) {
136 return new StringListParameter(name, value);
137 }
138 }

  ViewVC Help
Powered by ViewVC