mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-01-29 16:39:20 +01:00
Migrate RepeatMode enum to kotlin.
Signed-off-by: Yahor Berdnikau <egorr.berd@gmail.com>
This commit is contained in:
parent
773158859e
commit
82e265fda9
@ -1,35 +0,0 @@
|
||||
package org.moire.ultrasonic.domain;
|
||||
|
||||
/**
|
||||
* @author Sindre Mehus
|
||||
* @version $Id$
|
||||
*/
|
||||
public enum RepeatMode
|
||||
{
|
||||
OFF
|
||||
{
|
||||
@Override
|
||||
public RepeatMode next()
|
||||
{
|
||||
return ALL;
|
||||
}
|
||||
},
|
||||
ALL
|
||||
{
|
||||
@Override
|
||||
public RepeatMode next()
|
||||
{
|
||||
return SINGLE;
|
||||
}
|
||||
},
|
||||
SINGLE
|
||||
{
|
||||
@Override
|
||||
public RepeatMode next()
|
||||
{
|
||||
return OFF;
|
||||
}
|
||||
};
|
||||
|
||||
public abstract RepeatMode next();
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.moire.ultrasonic.domain
|
||||
|
||||
enum class RepeatMode {
|
||||
OFF {
|
||||
override operator fun next(): RepeatMode = ALL
|
||||
},
|
||||
ALL {
|
||||
override operator fun next(): RepeatMode = SINGLE
|
||||
},
|
||||
SINGLE {
|
||||
override operator fun next(): RepeatMode = OFF
|
||||
};
|
||||
|
||||
abstract operator fun next(): RepeatMode
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user