-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
78 additions
and
77 deletions.
There are no files selected for viewing
155 changes: 78 additions & 77 deletions
155
src/main/java/no/stelar7/api/r4j/basic/constants/types/val/GameQueueType.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,78 @@ | ||
package no.stelar7.api.r4j.basic.constants.types.val; | ||
|
||
import no.stelar7.api.r4j.basic.constants.types.CodedEnum; | ||
|
||
import java.util.Optional; | ||
import java.util.stream.Stream; | ||
|
||
public enum GameQueueType implements CodedEnum<GameQueueType> | ||
{ | ||
|
||
COMPETITIVE("competitive"), | ||
DEATHMATCH("deathmatch"), | ||
SPIKE_RUSH("spikerush"), | ||
UNRATED("unrated"), | ||
CUSTOM_GAME(""), | ||
TOURNAMENT_MODE("tournamentmode"), | ||
ONE_FOR_ALL("onefa"), | ||
ESCALATION("ggteam"), | ||
NEW_MAP("newmap"), | ||
; | ||
|
||
|
||
private final String queue; | ||
|
||
/** | ||
* Constructor for MapType | ||
* | ||
* @param code the mapId | ||
*/ | ||
GameQueueType(final String code) | ||
{ | ||
this.queue = code; | ||
} | ||
|
||
/** | ||
* Gets from code. | ||
* | ||
* @param mapId the map id | ||
* @return the from code | ||
*/ | ||
public Optional<GameQueueType> getFromCode(final String mapId) | ||
{ | ||
return Stream.of(GameQueueType.values()).filter(t -> t.queue.equals(mapId)).findFirst(); | ||
} | ||
|
||
@Override | ||
public String prettyName() | ||
{ | ||
switch (this) | ||
{ | ||
default: | ||
return "This enum does not have a pretty name"; | ||
} | ||
} | ||
|
||
/** | ||
* Gets id. | ||
* | ||
* @return the id | ||
*/ | ||
public String getId() | ||
{ | ||
return this.queue; | ||
} | ||
|
||
|
||
/** | ||
* Used internaly in the api... | ||
* | ||
* @return the value | ||
*/ | ||
public String getValue() | ||
{ | ||
return getId(); | ||
} | ||
|
||
} | ||
package no.stelar7.api.r4j.basic.constants.types.val; | ||
|
||
import no.stelar7.api.r4j.basic.constants.types.CodedEnum; | ||
|
||
import java.util.Optional; | ||
import java.util.stream.Stream; | ||
|
||
public enum GameQueueType implements CodedEnum<GameQueueType> | ||
{ | ||
|
||
COMPETITIVE("competitive"), | ||
DEATHMATCH("deathmatch"), | ||
SPIKE_RUSH("spikerush"), | ||
UNRATED("unrated"), | ||
CUSTOM_GAME(""), | ||
TOURNAMENT_MODE("tournamentmode"), | ||
ONE_FOR_ALL("onefa"), | ||
ESCALATION("ggteam"), | ||
NEW_MAP("newmap"), | ||
SWIFTPLAY("swiftplay") | ||
; | ||
|
||
|
||
private final String queue; | ||
|
||
/** | ||
* Constructor for MapType | ||
* | ||
* @param code the mapId | ||
*/ | ||
GameQueueType(final String code) | ||
{ | ||
this.queue = code; | ||
} | ||
|
||
/** | ||
* Gets from code. | ||
* | ||
* @param mapId the map id | ||
* @return the from code | ||
*/ | ||
public Optional<GameQueueType> getFromCode(final String mapId) | ||
{ | ||
return Stream.of(GameQueueType.values()).filter(t -> t.queue.equals(mapId)).findFirst(); | ||
} | ||
|
||
@Override | ||
public String prettyName() | ||
{ | ||
switch (this) | ||
{ | ||
default: | ||
return "This enum does not have a pretty name"; | ||
} | ||
} | ||
|
||
/** | ||
* Gets id. | ||
* | ||
* @return the id | ||
*/ | ||
public String getId() | ||
{ | ||
return this.queue; | ||
} | ||
|
||
|
||
/** | ||
* Used internaly in the api... | ||
* | ||
* @return the value | ||
*/ | ||
public String getValue() | ||
{ | ||
return getId(); | ||
} | ||
|
||
} |