[error] both method addVertex in class OrientBaseGraph of type (x$1: Any, x$2: <repeated...>[Object])com.tinkerpop.blueprints.impls.orient.OrientVertex
[error] and method addVertex in class OrientBaseGraph of type (x$1: Any)com.tinkerpop.blueprints.impls.orient.OrientVertex
[error] match argument types (String)
[error] val npNode = g.addVertex(f"class:$NPPhrase")
[error]
我該如何讓Scala選擇我想要調用的方法(更具體的方法)?Scala重載的方法解決問題。如何讓編譯器選擇正確的方法?
哦,雖然在這方面g.addVertext(...,Nil)
語義上相同,我仍然想知道如何解決上述問題。
請顯示代碼! –
你會如何處理代碼?它只是一個以字符串作爲輸入的方法。好吧,也許你需要看看'NPPhrase'是什麼:'def NPPhrase =「NPChunkPhrase」' –
歡呼聲,那個人有一個明智的答案(創建一個java消歧類)「。 –