|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
Bindings.java | - | 100% | 100% | 100% |
|
1 | /** | |
2 | * JTRunner is free software; you can redistribute it and/or modify it under the | |
3 | * terms of the GNU General Public License as published by the Free Software | |
4 | * Foundation; either version 2, or (at your option) any later version. | |
5 | */ | |
6 | ||
7 | package jtr.config.ws; | |
8 | ||
9 | import java.io.Serializable; | |
10 | ||
11 | import java.util.HashMap; | |
12 | ||
13 | /** | |
14 | * This class defines a set of <code>Binding</code>s. | |
15 | * @author Francesco Russo (frusso@java.dev.net) | |
16 | * @since 4.0 | |
17 | * @version 3.0 | |
18 | */ | |
19 | public class Bindings implements Serializable { | |
20 | ||
21 | /** Creates a new instance of Bindings */ | |
22 | 1 | public Bindings() { |
23 | 1 | bindings = new HashMap<String,Binding>(); |
24 | } | |
25 | ||
26 | /** | |
27 | * Add a single <code>Binding</code>. | |
28 | * @param binding The binding | |
29 | */ | |
30 | 8 | public void addBinding(Binding binding) { |
31 | 8 | bindings.put(binding.getUniqueName(), binding); |
32 | } | |
33 | ||
34 | /** | |
35 | * Get a <code>Binding</code> by its unique name. | |
36 | * @param name The binding's unique name | |
37 | * @return Binding The binding or <code>null</code> | |
38 | */ | |
39 | 6014 | public Binding getBinding(String name) { |
40 | 6014 | return bindings.get(name); |
41 | } | |
42 | ||
43 | private HashMap<String,Binding> bindings; | |
44 | } |
|