Skip to content

Instantly share code, notes, and snippets.

View sandeepkota's full-sized avatar

Sandeep Kota sandeepkota

View GitHub Profile
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?
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.