PageRenderTime 12ms CodeModel.GetById 1ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/ws-tester-xor/ws-tester-xor-wsdl/src/main/java/com/googlecode/ws/tester/xor/wsdl/model/Message.java

http://ws-tester.googlecode.com/
Java | 48 lines | 34 code | 8 blank | 6 comment | 1 complexity | 311f8c443f530432787b4a301da34817 MD5 | raw file
 1package com.googlecode.ws.tester.xor.wsdl.model;
 2
 3import java.util.List;
 4import java.util.ArrayList;
 5
 6/**
 7 * Created by IntelliJ IDEA.
 8 * User: pablo
 9 * Date: 2009-06-09
10 * Time: 20:01:17
11 */
12public class Message {
13    private String name;
14    private List<Part> parts;
15
16    public String getName() {
17        return name;
18    }
19
20    public void setName(String name) {
21        this.name = name;
22    }
23
24    public List<Part> getParts() {
25        return parts;
26    }
27
28    public void setParts(List<Part> parts) {
29        this.parts = parts;
30    }
31
32    public void addPart(Part part) {
33        if(this.parts==null) {
34            this.parts = new ArrayList<Part>();
35        }
36        this.parts.add(part);
37    }
38
39    @Override
40    public String toString() {
41        final StringBuilder sb = new StringBuilder();
42        sb.append("Message");
43        sb.append("{name='").append(name).append('\'');
44        sb.append(", part=").append(parts);
45        sb.append('}');
46        return sb.toString();
47    }
48}