35bad1badd7636adb0bf0bfe79b032f789f4d4cf
[aaf/authz.git] / misc / env / src / main / java / org / onap / aaf / misc / env / StaticSlot.java
1 /**\r
2  * ============LICENSE_START====================================================\r
3  * org.onap.aaf\r
4  * ===========================================================================\r
5  * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
6  * ===========================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  * \r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * \r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END====================================================\r
19  *\r
20  */\r
21 \r
22 /**\r
23  * Slot.java\r
24  *\r
25  * Created on: Dec 5, 2008\r
26  * Created by: Jonathan\r
27  *\r
28  * (c)2008 SBC Knowledge Ventures, L.P. All rights reserved.\r
29  ******************************************************************* \r
30  * RESTRICTED - PROPRIETARY INFORMATION The Information contained \r
31  * herein is for use only by authorized employees of AT&T Services, \r
32  * Inc., and authorized Affiliates of AT&T Services, Inc., and is \r
33  * not for general distribution within or outside the respective \r
34  * companies. \r
35  *******************************************************************\r
36  */\r
37 package org.onap.aaf.misc.env;\r
38 \r
39 /**\r
40  * StaticSlot's are used to store and retrieve data from the Organizer that does not change.\r
41  */\r
42 public final class StaticSlot {\r
43 \r
44         /*\r
45          * The name of the StaticSlot.\r
46          */\r
47         private final String key;\r
48         \r
49         /*\r
50          * The index of the Organizer's static map associated with this StaticSlot.\r
51          */\r
52         final int slot; \r
53         \r
54         /**\r
55          * Constructs a new StaticSlot.\r
56          * \r
57          * @param index\r
58          *                      The index of Organizer's static map this StaticSlot is associated with.\r
59          * @param name\r
60          *                      The name of the StaticSlot's key.\r
61          */\r
62         StaticSlot(int index, String name) {\r
63                 slot = index;\r
64                 key = name;\r
65         }\r
66         \r
67         /**\r
68          * Debug method only to print key=slot pairs.\r
69          */\r
70         public String toString() {\r
71                 return key + '=' + slot;\r
72         }\r
73         \r
74         /**\r
75          * Returns the name of this StaticSlot's key.\r
76          * \r
77          * @return\r
78          *                      The name of this StaticSlot's key.\r
79          */\r
80         public String getKey() {\r
81                 return key;\r
82         }\r
83 \r
84 }\r
85 \r