• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.net.lowpan;
18 
19 /** {@hide} */
20 public final class LowpanProperties {
21 
22     public static final LowpanProperty<int[]> KEY_CHANNEL_MASK =
23             new LowpanStandardProperty("android.net.lowpan.property.CHANNEL_MASK", int[].class);
24 
25     public static final LowpanProperty<Integer> KEY_MAX_TX_POWER =
26             new LowpanStandardProperty("android.net.lowpan.property.MAX_TX_POWER", Integer.class);
27 
28     /** @hide */
LowpanProperties()29     private LowpanProperties() {}
30 
31     /** @hide */
32     static final class LowpanStandardProperty<T> extends LowpanProperty<T> {
33         private final String mName;
34         private final Class<T> mType;
35 
LowpanStandardProperty(String name, Class<T> type)36         LowpanStandardProperty(String name, Class<T> type) {
37             mName = name;
38             mType = type;
39         }
40 
41         @Override
getName()42         public String getName() {
43             return mName;
44         }
45 
46         @Override
getType()47         public Class<T> getType() {
48             return mType;
49         }
50 
51         @Override
toString()52         public String toString() {
53             return getName();
54         }
55     }
56 }
57