Skip to content

Instantly share code, notes, and snippets.

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class InferenciaDeTiposEmJava {
// Inferência meia boca
List<Map<String, Integer>> a = new ArrayList<>();
public static void main(final String[] args) {
export PS1="\[\033[38m\]\u@\h\[\033[32m\] \w \[\033[31m\]\`git branch 2>/dev/null | grep \"^\*\" | sed -r \"s/\*\ (.*)/\(\1\)/\"\` \`git status --porcelain 2>/dev/null | tee >(grep -c \"^[A-Z] \") | tee >(grep -c \"^ [A-Z]\") | tee >(grep -c \"^??\") | tee >(grep -c \"^[A-Z][A-Z]\") | grep \"^[0-9]\" | tr \"\n\" \" \" | grep -v \"0 0 0 0 \"\`\[\033[37m\]$\[\033[00m\] "
package aux
class BuilderTypeSafe {
type Sim
type Nao
class Pessoa
class Builder[TemNome, TemEndereco] {
package aux
object Scaladores extends App {
implicit class AddOf(val num : Int) extends AnyVal {
def of[T <: MeasureUnit] = Value[T](num)
}
trait MeasureUnit
trait x[A <: MeasureUnit, B <: MeasureUnit] extends MeasureUnit
Test cla