source: java/main/src/main/java/com/framsticks/params/GroupBuilder.java @ 193

Last change on this file since 193 was 193, checked in by Maciej Komosinski, 10 years ago

Set svn:eol-style native for all textual files

  • Property svn:eol-style set to native
File size: 867 bytes
Line 
1package com.framsticks.params;
2
3import java.util.ArrayList;
4import java.util.List;
5
6import com.framsticks.params.annotations.FramsClassAnnotation;
7import com.framsticks.params.annotations.ParamAnnotation;
8import com.framsticks.util.Builder;
9
10@FramsClassAnnotation(id = "group", name = "group")
11public class GroupBuilder implements Builder<Group> {
12
13        @ParamAnnotation
14        protected String name;
15
16        protected final List<Param> params = new ArrayList<Param>();
17
18        public GroupBuilder() {
19        }
20
21        @ParamAnnotation
22        public GroupBuilder name(String name) {
23                this.name = name;
24                return this;
25        }
26
27        /**
28         * @return the name
29         */
30        public String getName() {
31                return name;
32        }
33
34        /**
35         * @return the params
36         */
37        public List<Param> getParams() {
38                return params;
39        }
40
41        public Group finish() {
42                return new Group(this);
43        }
44
45        public void addParam(Param param) {
46                params.add(param);
47        }
48
49
50}
Note: See TracBrowser for help on using the repository browser.