Created
April 24, 2014 15:33
-
-
Save jwir3/11259018 to your computer and use it in GitHub Desktop.
Shortcode Resolver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------------- | |
// EXPERIENCE_TYPE | |
// Created by bradbenson | |
// Copyright (c) 2014 by Jingit LLC | |
// All Rights Reserved | |
// | |
// | |
package com.jingit.mobile; | |
/** | |
* Different types of engagements. | |
*/ | |
public enum EXPERIENCE_TYPE { | |
// Values | |
Unknown, | |
Engagement, | |
Offer, | |
Channel; | |
public static EXPERIENCE_TYPE getType(String a_strType) | |
{ | |
EXPERIENCE_TYPE result = EXPERIENCE_TYPE.Unknown; // Result value - assume failure. | |
// String non-null? | |
if( a_strType != null ) { | |
// Get type string and turn it into an enumeration | |
if(a_strType.equalsIgnoreCase("STANDARD") || a_strType.equalsIgnoreCase("CHECKIN")) { | |
result = EXPERIENCE_TYPE.Engagement; | |
} else if(a_strType.equalsIgnoreCase("OFFER")) { | |
result = EXPERIENCE_TYPE.Offer; | |
} else if(a_strType.equalsIgnoreCase("CHANNEL")) { | |
result = EXPERIENCE_TYPE.Channel; | |
} | |
} | |
// Done! | |
return result; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment