util

Clone or download

Refactored code

Modified Files

M .gitignore
+7 −1
.idea/
.idea/
target/
target/
Util.iml
Util.iml
.settings/
.project
.factorypath
.classpath
package com.StreamPi.Util.Platform;
package com.StreamPi.Util.Platform;
public enum Platform {
public enum Platform {
WINDOWS, LINUX, MAC, ANDROID, IOS, LINUX_RPI, UNKNOWN;
WINDOWS("Windows"),
LINUX("Linux"),
MAC("MacOS"),
ANDROID("Android"),
IOS("iOS"),
LINUX_RPI("Raspberry Pi"),
UNKNOWN("Unknown");
public static String getUIName(Platform platform)
final private String UIName;
Platform(String UIName)
{
this.UIName = UIName;
}
public String getUIName()
{
{
switch (platform)
return UIName;
{
case WINDOWS: return "Windows";
case LINUX: return "Linux";
case LINUX_RPI : return "Linux Raspberry Pi";
case MAC: return "MacOS";
case ANDROID: return "Android";
case IOS: return "iOS";
case UNKNOWN:
default:
return "Unknown";
}
}
}
}
}
/*
/*
ReleaseStatus.java
ReleaseStatus.java
Contributors : Debayan Sutradhar (@dubbadhar)
Written By : Debayan Sutradhar (@rnayabed)
Enum to store the current status of the Server Release
Enum to store the current status of the Server Release
*/
*/
package com.StreamPi.Util.Platform;
package com.StreamPi.Util.Platform;
public enum ReleaseStatus {
public enum ReleaseStatus {
EA, GA;
EA("Early Access"), GA("General Availability");
private final String UIName;
ReleaseStatus(String UIName)
{
this.UIName = UIName;
}
public static String getUIName(ReleaseStatus releaseStatus)
public String getUIName()
{
{
switch (releaseStatus)
return UIName;
{
case EA: return "Early Access";
case GA: return "General Availability";
default:
return null;
}
}
}
}
}