* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package org.onap.aai.restcore;
/**
* The Enum MediaType.
*/
public enum MediaType {
- APPLICATION_JSON_TYPE("application/json"),
- APPLICATION_XML_TYPE("application/xml");
-
- private final String text;
+ APPLICATION_JSON_TYPE("application/json"), APPLICATION_XML_TYPE("application/xml");
+
+ private final String text;
/**
* Instantiates a new media type.
private MediaType(final String text) {
this.text = text;
}
-
+
/**
* Gets the enum.
*
* @return the enum
*/
public static MediaType getEnum(String value) {
-
- for(MediaType v : values()) {
- if(v.toString().equalsIgnoreCase(value)) {
- return v;
- }
- }
-
+
+ for (MediaType v : values()) {
+ if (v.toString().equalsIgnoreCase(value)) {
+ return v;
+ }
+ }
+
throw new IllegalArgumentException("bad value: " + value);
-
+
}
-
+
/**
- * @{inheritDoc}
- */
+ * @{inheritDoc}
+ */
@Override
public String toString() {
return text;