2018-04-15 20:35:00 +02:00
|
|
|
package org.schabi.newpipe.playqueue.events;
|
2017-10-09 07:43:07 +02:00
|
|
|
|
2017-10-23 03:58:01 +02:00
|
|
|
public class MoveEvent implements PlayQueueEvent {
|
2017-10-09 07:43:07 +02:00
|
|
|
final private int fromIndex;
|
|
|
|
final private int toIndex;
|
|
|
|
|
|
|
|
@Override
|
2017-10-23 03:58:01 +02:00
|
|
|
public PlayQueueEventType type() {
|
|
|
|
return PlayQueueEventType.MOVE;
|
2017-10-09 07:43:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public MoveEvent(final int oldIndex, final int newIndex) {
|
|
|
|
this.fromIndex = oldIndex;
|
|
|
|
this.toIndex = newIndex;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getFromIndex() {
|
|
|
|
return fromIndex;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getToIndex() {
|
|
|
|
return toIndex;
|
|
|
|
}
|
|
|
|
}
|