X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=android%2Fandroid_api%2Fbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fiotivity%2Fbase%2FOcPresenceStatus.java;h=02b774fa3518b7fd28f75b1dba12fd130f65b150;hb=17c68b2fd1e74586f85e552eeab4e32dc121f8a0;hp=ff2c7dcea7894cc1ba39e4f54edd9e04be39f57c;hpb=8c01dff2c5bc5496f7dc1632c498943ec6ecb015;p=platform%2Fupstream%2Fiotivity.git diff --git a/android/android_api/base/src/main/java/org/iotivity/base/OcPresenceStatus.java b/android/android_api/base/src/main/java/org/iotivity/base/OcPresenceStatus.java index ff2c7dc..02b774f 100644 --- a/android/android_api/base/src/main/java/org/iotivity/base/OcPresenceStatus.java +++ b/android/android_api/base/src/main/java/org/iotivity/base/OcPresenceStatus.java @@ -1,50 +1,50 @@ -/* - * //****************************************************************** - * // - * // Copyright 2015 Intel Corporation. - * // - * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - * // - * // Licensed under the Apache License, Version 2.0 (the "License"); - * // you may not use this file except in compliance with the License. - * // You may obtain a copy of the License at - * // - * // http://www.apache.org/licenses/LICENSE-2.0 - * // - * // Unless required by applicable law or agreed to in writing, software - * // distributed under the License is distributed on an "AS IS" BASIS, - * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * // See the License for the specific language governing permissions and - * // limitations under the License. - * // - * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - */ - -package org.iotivity.base; - -import java.security.InvalidParameterException; - -public enum OcPresenceStatus { - OK("OK"), - STOPPED("PRESENCE_STOPPED"), - TIMEOUT("PRESENCE_TIMEOUT"), - DO_NOT_HANDLE("PRESENCE_DO_NOT_HANDLE"); - - private String value; - - private OcPresenceStatus(String value) { - this.value = value; - } - - public static OcPresenceStatus get(String val) { - for (OcPresenceStatus v : OcPresenceStatus.values()) { - if (v.getValue().equals(val)) - return v; - } - throw new InvalidParameterException("Unexpected OcPresenceStatus value"); - } - - public String getValue() { - return this.value; - } -} +/* + * //****************************************************************** + * // + * // Copyright 2015 Intel Corporation. + * // + * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + * // + * // Licensed under the Apache License, Version 2.0 (the "License"); + * // you may not use this file except in compliance with the License. + * // You may obtain a copy of the License at + * // + * // http://www.apache.org/licenses/LICENSE-2.0 + * // + * // Unless required by applicable law or agreed to in writing, software + * // distributed under the License is distributed on an "AS IS" BASIS, + * // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * // See the License for the specific language governing permissions and + * // limitations under the License. + * // + * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + */ + +package org.iotivity.base; + +import java.security.InvalidParameterException; + +public enum OcPresenceStatus { + OK("OK"), + STOPPED("PRESENCE_STOPPED"), + TIMEOUT("PRESENCE_TIMEOUT"), + DO_NOT_HANDLE("PRESENCE_DO_NOT_HANDLE"); + + private String value; + + private OcPresenceStatus(String value) { + this.value = value; + } + + public static OcPresenceStatus get(String val) { + for (OcPresenceStatus v : OcPresenceStatus.values()) { + if (v.getValue().equals(val)) + return v; + } + throw new InvalidParameterException("Unexpected OcPresenceStatus value"); + } + + public String getValue() { + return this.value; + } +}