score:0
Accepted answer
if you do not like movie.information
in your code you just need to import movie._
.
import movie._
def getmovieinformation (name: string) : information = {
//call internal api and get the value based on the key from movie.qualityfeedback
//now just return information
}
classes defined inside objects in scala are almost the same as static classes inside classes in java. you would have the extra movie.
in both languages unless you import (or static import in java).
Source: stackoverflow.com
Related Query
- @JsonIgnore serialising Scala case class property using Jackon and Json4s
- Passing case class between Scala and Flex using BlazeDS
- Scala traits using generics and case class methods
- StackOverflowError When Calling RDD#toDS Using Java Object Instead of a Scala Case Class
- Access companion object from case class (or vice-versa) using scala type macros
- Scala problems with slick 2, when case class and object name are same
- Scala case class and companion object can't override apply with diff signature
- Scala: Modelling using an object, a case class, and a listMap
- Using Java Domain Object Instead of Scala Case Class in Spark DataSet Creation
- Scala Generics with Case Class and Object Companion
- How to parse a csv with matching case class and store the output to treemap[Int, List[List[InputConfig]] object in scala
- Using a case class with map and nested case class with gremlin scala
- Compare a list values with case class using Scala and Spark
- How to join multiple RDD having Object using scala with case class
- If scala case class and object have same name, how to import case class only
- Difference between object and class in Scala
- How to update a mongo record using Rogue with MongoCaseClassField when case class contains a scala Enumeration
- Scala class and case class == comparison
- Scala 2.10, its impact on JSON libraries and case class validation/creation
- Scala - No TypeTag Available Exception when using case class to try to get TypeTag?
- Read case class object from string in Scala (something like Haskell's "read" typeclass)
- Using Jackson to (De)-serialize a Scala Case Class
- Understanding Case class and Traits in Scala
- Case class and companion object
- Scala wont pattern match with java.lang.String and Case Class
- Scala getting field and type of field of a case class
- Problem with bounded type parameterised case class and default args in Scala
- Serialize and Deserialize scala enumerations or case objects using json4s
- How to check which parameters of case class have default value using scala reflection 2.10
- Scala Dynamic Parse Json using case class No Manifest available for T
More Query from same tag
- How to serialize JSON with json4s with UTF-8 characters?
- Using Circe optics to modify all fields of an object, or all items of an array
- Exclude particular test subclass in ScalaTest (maven)
- Collapse a Spark DataFrame
- Cannot resolve errors for Scalatra project in Intellij IDEA IDE
- Minimal full SBT project with plugins
- Read the input xml data from HDFS using scala
- how do I get sbt to gather all the jar files my code depends on into one place?
- Scala Option pattern matching with case class
- How to deal with a large number (20+) of SettingKeys related to a TaskKey?
- SBT run with provided works under the '.' projects but fails with no mercy under any subprojects
- How do i iterate functions in Python to create array?
- Split row into multiple rows to limit length of array in column (spark / scala)
- Scala: string pattern matching
- How can I use a Scala class as the shared root object across class loaders?
- How can I match classes in a Scala "match" statement?
- Cannot compile file in Scala
- Why Some(null) isn't considered None?
- parsing JSON into classes with Option[T] arg types in spark-shell with Scala
- Operators on Scala short return Int?
- Spark Scala CSV Input to Nested Json
- optimal way of storing multidimensional array/tensor
- sbt compilation causes stackoverflow error
- How do I scale my Scala REST application that uses Akka?
- Akka-Streams: At-Least-Once-Delivery behaviour with Kafka and Cassandra
- How to print dependency jars for use in an environment variable?
- Implementing a java interface in Scala
- In Scala, how can I put an incrementing ID in XML element using transformer / Rewrite rule
- A Jax-RS client that does a post with a request body of a JSON string
- Spark SQL: Unable to use aggregate within a window function