mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +02:00
01dbfee4c0
Tweetypie is the core Tweet service that handles the reading and writing of Tweet data.
12 lines
503 B
Scala
12 lines
503 B
Scala
package com.twitter.tweetypie.thriftscala.entities
|
|
|
|
import com.twitter.tweetypie.thriftscala.MediaEntity
|
|
import com.twitter.tweetypie.tweettext.TextEntity
|
|
|
|
object MediaTextEntity extends TextEntity[MediaEntity] {
|
|
override def fromIndex(entity: MediaEntity): Short = entity.fromIndex
|
|
override def toIndex(entity: MediaEntity): Short = entity.toIndex
|
|
override def move(entity: MediaEntity, fromIndex: Short, toIndex: Short): MediaEntity =
|
|
entity.copy(fromIndex = fromIndex, toIndex = toIndex)
|
|
}
|