package com.sharefile.api.enumerations;

import com.google.gson.annotations.SerializedName;

public class SFSafeEnum<T extends Enum> 
{
	private Enum mEnum;	
	
	@SerializedName("value")
	private String originalString;
	
	public void setValue(String v, Enum e)
	{
		originalString = v;
		mEnum = e;
	}
	
	public SFSafeEnum(Enum e)
	{
		setValue(e.toString(), e);
	}
	
	public SFSafeEnum() 
	{
		
	}

	public String getOriginalString()
	{
		return originalString;
	}	
	
	public Enum get()
	{
		return mEnum;
	}
	
	@Override
	public String toString() 
	{		
		return originalString;
	}
}
@@ -574,10 +574,87 @@
 ring;%0A%09%7D
+%0A%0A    boolean equals(Enum target)%0A    %7B%0A        return mEnum == target;%0A    %7D
 %0A%7D

add comparison support to SafeEnum