This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Zoo(str: String) | |
trait FZ | |
case class Foo(z: Zoo) extends FZ | |
case class Bar(z: Zoo) extends FZ | |
def some(f: FZ) = { | |
f match { | |
case Foo(z) | Bar(z) => | |
println(z.str) | |
// Since 'z' is of Same type, can I get it here? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.onos.byon.cli; | |
import org.apache.karaf.shell.commands.Argument; | |
import org.apache.karaf.shell.commands.Command; | |
import org.onos.byon.NetworkService; | |
import org.onosproject.cli.AbstractShellCommand; | |
import org.onosproject.net.HostId; | |
/** | |
* CLI to add a host to a network. |