Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从Scala中的文件导入类?_Scala - Fatal编程技术网

如何从Scala中的文件导入类?

如何从Scala中的文件导入类?,scala,Scala,有一个名为RSSEntry.scala的文件,下面是它的组成部分 package com.github.catalystcode.fortis.spark.streaming.rss case class RSSEntry( source: RSSFeed, uri: String, title: String, links: List[RSSLink], content: List[RSSContent], description: RSSContent, enc

有一个名为RSSEntry.scala的文件,下面是它的组成部分

package com.github.catalystcode.fortis.spark.streaming.rss

case class RSSEntry(
  source: RSSFeed,
  uri: String,
  title: String,
  links: List[RSSLink],
  content: List[RSSContent],
  description: RSSContent,
  enclosures: List[RSSEnclosure],
  publishedDate: Long,
  updatedDate: Long,
  authors: List[RSSPerson],
  contributors: List[RSSPerson]
)

case class RSSFeed(feedType: String, uri: String, title: String, description: String, link: String)
case class RSSLink(href: String, title: String)
case class RSSContent(contentType: String, mode: String, value: String)
case class RSSEnclosure(url: String, enclosureType: String, length: Long)
case class RSSPerson(name: String, uri: String, email: String)
case class RSSCategory(name: String, taxonomyUri: String)
如何从该文件导入
RSSLink

您可以使用:

import com.github.catalystcode.fortis.spark.streaming.rss.RSSLink