Vector2D.javaをscalaに