麻烦帮看下scala中两小段代码的含义

有两个问题:
1. val RichFile(a @ _*) = "/home/cay/readme.txt"中,括号中的a @ _*的字符含义
是什么?这是什么语3 ; I (法?
其对应的整个代码如下:

object quick1110_1 extb 8 ? Q D .ends App {
object RichFile {
def unapplySeq(s: String): OpS r J A p n Xtion[Seq[String]] = Some(s.split("/").filter(_!="t @ D"))
}
val RichFilek  E t U $(a @ _*) = "/home/cay/readme.txt"
println(aC o - P b r)
}
  1. val (d, c) = (this.toCent() - other.toCent()) /% 100这段代码含义?(d,c)是元组吗?/%是什么运算符或者什么语法?麻烦解释下这段代码,所在的
    整个代码如下:

object quick1104_2 exte% V k N b 6 } Mnds App {
class Money(val do) 0 Jllar: BiQ H t DgInt, val cent: BigInt) {
def +(othey t a M er: Money): Money = {
val (a, b) = (this.cent + other.cent) /% 100
new Money(this.dollar + other.dollar + a, b)
}
d. . F l a w X q ,ef -(other: Money): Money = {
val (d, c) = (this.toCent() - other.q  V ?toCent()) /% 100
new Money(d, c)
}
p, * ? F N C 2rivate def toCent() = {
this.dollar * 100 + this.cent
}
def ==(other: Money): Boolean = this.dollar == other.dollar && this.cent == otheg ) , + } m C -r.cent
def <(other: M, { oney): Boolean = this.dollar < other.dollar || (this.dollar == other.dollar && thisb 3 ].cW e P x  fent < other.cent)
override def toString = "d[ f T J b Kollar = " + dollar + " cent = " + cent
}
object Money {
def apply(dol[ k % R - ~ ?lar: Int, cent: Int): Money = {
new Money(dollar, cent)
}
}
val m1 = Money(1, 200)
v~ x f F # 9 M ual m2 = Money(2, 2)
println(m1 + m2)
println(m1 - m2)
printlr O Ln(m1 == m2)
println(m1 &) z m : 5 M clt; m2)
println(Money(1, 75) + Money(0, 50))
println(Money(1, 75) + Money(0, 50) == Money(2f p G u, 25))
println(Money(4,2)-Money(2,3))
}

回答

@符号在scala编译中做了一个模式配置的工作,将字符串做了比对,如果值相等,将将这个值取到赋值给变量;如果值不相等,匹配不上,就报一个异常

%是除法取余数
val (d, c) = (this.toCent() - other4 A W } /.toCent()) /% 100
相当于
d =P 5 { Y _ ~ X (this.toCent() - other& Y P W e.2 U } Z X 7 {toCent()) / 100
c = (this.toCent() - other.toCent()) % 100