public Vertex addVertex(final Object... keyValues);
public class KeyValue {
public final String key;
public final Object value;
public KeyValue(String key, Object value) {
this.key = key;
this.value = value;
}
}
public Vertex addVertex(final KeyValue... keyValues);
"There may be more than one such method, in which case the most specific one is chosen."
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/1d55285f-f0d4-44ba-82ae-6c511218df35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
def addVertex(properties: (String, Any)*): ScalaVertex = {
val params = properties.flatMap(pair ⇒ Seq(pair._1, pair._2.asInstanceOf[AnyRef]))
graph.addVertex(params)
}
def addVertex(properties: Map[String, Any]): ScalaVertex =
addVertex(properties.toSeq: _*)
Hi,
The code you quoted is not linked to the issue I mentioned. In the quoted code we are just forcing the boxing of AnyVal (all primitive values) to an AnyRef (alias to the java Object). And that code is fine.
The map version is calling the scala addVertex (overloading). So the second quote is calling the first one.
The issue I am talking about is this one:
https://issues.scala-lang.org/plugins/servlet/mobile#issue/SI-4775
And this is due to Scala only.
Cheers
You received this message because you are subscribed to a topic in the Google Groups "Gremlin-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gremlin-users/M7knBWSHVi4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/6c065970-3808-4508-91df-2e945c9b68f4%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CAJYfrs1GmFAer34OfAxXqMbMYn%3DP_ivJZwqa8TU86mWyUNAx0Q%40mail.gmail.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Gremlin-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gremlin-users/M7knBWSHVi4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/eb2a451a-af66-48a1-989c-8021473647fc%40googlegroups.com.
A questions though: Will a non-string really work?