//  
//  SortDirectionType.java
//  blogwt
//
//  Created by William Shakour on May 12, 2015.
//  Copyrights © 2015 WillShex Limited. All rights reserved.
//
package com.willshex.blogwt.shared.api;

import java.util.HashMap;
import java.util.Map;

public enum SortDirectionType {
	SortDirectionTypeAscending("ascending"),
	SortDirectionTypeDescending("descending"), ;
	private String value;
	private static Map<String, SortDirectionType> valueLookup = null;

	public String toString() {
		return value;
	}

	private SortDirectionType(String value) {
		this.value = value;
	}

	public static SortDirectionType fromString(String value) {
		if (valueLookup == null) {
			valueLookup = new HashMap<String, SortDirectionType>();
			for (SortDirectionType currentSortDirectionType : SortDirectionType.values()) {
				valueLookup.put(currentSortDirectionType.value, currentSortDirectionType);
			}
		}
		return valueLookup.get(value);
	}
}
@@ -358,17 +358,16 @@
 nding%22),
- 
 ;%0A%09priva
@@ -474,16 +474,17 @@
 toString
+ 
 () %7B%0A%09%09r
@@ -526,16 +526,17 @@
 tionType
+ 
 (String 
@@ -613,16 +613,17 @@
 omString
+ 
 (String 
@@ -785,24 +785,30 @@
 irectionType
+%0A%09%09%09%09%09
 .values()) %7B
@@ -859,17 +859,23 @@
 e.value,
- 
+%0A%09%09%09%09%09%09
 currentS
@@ -938,9 +938,161 @@
 ue);%0A%09%7D%0A
-%7D
+%0A%09public SortDirectionType reverse () %7B%0A%09%09return this == SortDirectionTypeAscending ? SortDirectionTypeDescending%0A%09%09%09%09: SortDirectionTypeAscending;%0A%09%7D%0A%7D%0A

sort direction can be reversed