Skip to content

Commit

Permalink
Merge pull request scala#4591 from vsalvis/vsalvis-stringdoc
Browse files Browse the repository at this point in the history
SI-8140 Documentation references java.lang.String directly
  • Loading branch information
SethTisue committed Jun 30, 2015
2 parents 12f92b7 + b1c7d21 commit 6ca8847
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/library/scala/Predef.scala
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ object Predef extends LowPriorityImplicits with DeprecatedPredef {
*/
def classOf[T]: Class[T] = null // This is a stub method. The actual implementation is filled in by the compiler.

/** The `String` type in Scala has methods that come either from the underlying
* Java String (see the documentation corresponding to your Java version, for
* example [[http://docs.oracle.com/javase/8/docs/api/java/lang/String.html]]) or
* are added implicitly through [[scala.collection.immutable.StringOps]].
*/
type String = java.lang.String
type Class[T] = java.lang.Class[T]

Expand Down
7 changes: 3 additions & 4 deletions src/library/scala/collection/immutable/StringOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ package immutable

import mutable.StringBuilder

/**
* This class serves as a wrapper providing `String`s with all the operations
* found in indexed sequences. Where needed, instances of `String` object
* are implicitly converted into this class.
/** This class serves as a wrapper providing [[scala.Predef.String]]s with all
* the operations found in indexed sequences. Where needed, `String`s are
* implicitly converted into instances of this class.
*
* The difference between this class and `WrappedString` is that calling transformer
* methods such as `filter` and `map` will yield a `String` object, whereas a
Expand Down

0 comments on commit 6ca8847

Please sign in to comment.