Rename “Controlled” to “ControlledComponent.”
[sonitus.git] / src / main / java / net / pterodactylus / sonitus / data / event / MetadataUpdated.java
1 /*
2  * Sonitus - MetadataUpdated.java - Copyright © 2013 David Roden
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 package net.pterodactylus.sonitus.data.event;
19
20 import net.pterodactylus.sonitus.data.ControlledComponent;
21 import net.pterodactylus.sonitus.data.Metadata;
22
23 /**
24  * Event that notifies all listeners that the {@link Metadata} of a {@link
25  * ControlledComponent} component was changed.
26  *
27  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
28  */
29 public class MetadataUpdated {
30
31         /** The controlled component. */
32         private final ControlledComponent controlledComponent;
33
34         /** The new metadata. */
35         private final Metadata metadata;
36
37         /**
38          * Creates a new metadata updated event.
39          *
40          * @param controlledComponent
41          *              The controlled component
42          * @param metadata
43          *              The new metadata
44          */
45         public MetadataUpdated(ControlledComponent controlledComponent, Metadata metadata) {
46                 this.controlledComponent = controlledComponent;
47                 this.metadata = metadata;
48         }
49
50         //
51         // ACCESSORS
52         //
53
54         /**
55          * Returns the controlled component.
56          *
57          * @return The controlled component
58          */
59         public ControlledComponent controlled() {
60                 return controlledComponent;
61         }
62
63         /**
64          * Returns the new metadata.
65          *
66          * @return The new metadata
67          */
68         public Metadata metadata() {
69                 return metadata;
70         }
71
72 }