com.backendless.servercode.model.RunnerMode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons Show documentation
Show all versions of commons Show documentation
Commons lib for both server and client Java/Android SDKs
The newest version!
package com.backendless.servercode.model;
public enum RunnerMode
{
DRAFT( 0 ),
DEBUG( 1 ),
PRODUCTION( 2 ),
MARKETPLACE( 3 );
private int id;
RunnerMode( int id )
{
this.id = id;
}
public int getId()
{
return id;
}
public static RunnerMode getById( int id)
{
for (RunnerMode sit : RunnerMode.values())
if (sit.getId() == id) return sit;
throw new IllegalArgumentException( "No enum constant \"" + RunnerMode.class.getName() + "\" for id \"" + id + "\"");
}
public static RunnerMode valueOfIgnoreCase( String name )
{
if( name == null )
throw new NullPointerException( "Argument \"name\" is null" );
String lowCaseName = name.toLowerCase();
for( RunnerMode mode : RunnerMode.values() )
if( mode.name().toLowerCase().equals( lowCaseName ) )
return mode;
throw new IllegalArgumentException( "No enum constant \"" + RunnerMode.class.getName() + "\" for name \"" + name + "\"" );
}
@Override
public String toString()
{
return name().substring( 0, 1 )
.concat( name().substring( 1 ).toLowerCase() );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy