Predef.$eq$colon$eq<A,B>

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Predef.$eq$colon$eq<A,B>

dali.midou2014
Hi,
I want to use a scala method with java. I need to pass Predef.$eq$colon$eq<A,B> argument. But I did not find any example to write Predef.$eq$colon$eq in java.
Can you help me please

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Predef.$eq$colon$eq<A,B>

Bartek Hamielec
Could you please provide more details? :)

Regards,
Bartek

W dniu czwartek, 9 marca 2017 01:39:19 UTC+1 użytkownik [hidden email] napisał:
Hi,
I want to use a scala method with java. I need to pass Predef.$eq$colon$eq<A,B> argument. But I did not find any example to write Predef.$eq$colon$eq in java.
Can you help me please

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Predef.$eq$colon$eq<A,B>

Oliver Ruebenacker

     Hello,

  I think you cannot refer to it directly in Java, but you can write an adapter in Scala, like

object PredefAdapter {
  val eqColonEq = Predef.=:=
}

  and then refer to it in Java as PredefAdapter.eqColonEq.

     Best, Oliver

On Thu, Mar 9, 2017 at 4:58 AM, Bartek Hamielec <[hidden email]> wrote:
Could you please provide more details? :)

Regards,
Bartek


W dniu czwartek, 9 marca 2017 01:39:19 UTC+1 użytkownik [hidden email] napisał:
Hi,
I want to use a scala method with java. I need to pass Predef.$eq$colon$eq<A,B> argument. But I did not find any example to write Predef.$eq$colon$eq in java.
Can you help me please

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.



--
Oliver Ruebenacker
Senior Software Engineer, Diabetes Portal, Broad Institute

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Predef.$eq$colon$eq<A,B>

dali.midou2014
In reply to this post by Bartek Hamielec
Hi,
I am using Graphx with java. I want to use the Graph.mapVertices() method and I need to pass Predef.$eq$colon$eq<VD,VD2> argument.

Le jeudi 9 mars 2017 17:30:19 UTC+1, Bartek Hamielec a écrit :
Could you please provide more details? :)

Regards,
Bartek

W dniu czwartek, 9 marca 2017 01:39:19 UTC+1 użytkownik [hidden email] napisał:
Hi,
I want to use a scala method with java. I need to pass Predef.$eq$colon$eq<A,B> argument. But I did not find any example to write Predef.$eq$colon$eq in java.
Can you help me please

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Predef.$eq$colon$eq<A,B>

Stephen Compall-3

On 3/9/17 1:29 PM, [hidden email] wrote:

I am using Graphx with java. I want to use the Graph.mapVertices() method and I need to pass Predef.$eq$colon$eq<VD,VD2> argument.

Sure.

class Leibniz {
  static <T> scala.Predef.$eq$colon$eq<T, T> reflexivity() {
    return scala.Predef.$eq$colon$eq$.MODULE$.tpEquals();
  }
}


--
Stephen Compall

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Predef.$eq$colon$eq<A,B>

dali.midou2014
Thank you,
I created a class Predef1:
public class Predef1 {
 static public <T> scala.Predef.$eq$colon$eq<T, T> reflexivity() {
   return scala.Predef.$eq$colon$eq$.MODULE$.tpEquals();
 }
}
and I use Predef1.reflexivity() to pass th argument but I have this error:
The method mapVertices(..., Predef.$eq$colon$eq<String,VD2>) is not applicable for the argument (..., Predef.$eq$colon$eq<Object,Object>)
I need to pass an argument Predef.$eq$colon$eq<String,VD2>

Le vendredi 10 mars 2017 01:27:36 UTC+1, Stephen Compall a écrit :

On 3/9/17 1:29 PM, <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3ZrOrTn3AQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">dali.mi...@... wrote:

I am using Graphx with java. I want to use the Graph.mapVertices() method and I need to pass Predef.$eq$colon$eq<VD,VD2> argument.

Sure.

class Leibniz {
  static <T> scala.Predef.$eq$colon$eq<T, T> reflexivity() {
    return scala.Predef.$eq$colon$eq$.MODULE$.tpEquals();
  }
}


--
Stephen Compall

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Predef.$eq$colon$eq<A,B>

Jasper-M
I assume VD2 is a type variable?

Then you have to do either of these:

1) Pass the reference around:

public <VD1> void myGenericMethod(VD1 vd, $eq$colon$eq<String,VD1> ev) {
  mapVertices(..., ev);
}

public void myMethod() {
  String vd = "VD";
  myGenericMethod(vd, Predef1.reflexivity());
}

2) Cast the reference:

public <VD1> void myMethod() {
  Object obj = Predef1.reflexivity();
  scala.Predef.$eq$colon$eq<String,VD1> ev = (scala.Predef.$eq$colon$eq<String,VD1>) obj;
  mapVertices(..., ev);
}

Op vrijdag 10 maart 2017 10:07:19 UTC+1 schreef [hidden email]:
Thank you,
I created a class Predef1:
public class Predef1 {
 static public <T> scala.Predef.$eq$colon$eq<T, T> reflexivity() {
   return scala.Predef.$eq$colon$eq$.MODULE$.tpEquals();
 }
}
and I use Predef1.reflexivity() to pass th argument but I have this error:
The method mapVertices(..., Predef.$eq$colon$eq<String,VD2>) is not applicable for the argument (..., Predef.$eq$colon$eq<Object,Object>)
I need to pass an argument Predef.$eq$colon$eq<String,VD2>

Le vendredi 10 mars 2017 01:27:36 UTC+1, Stephen Compall a écrit :

On 3/9/17 1:29 PM, [hidden email] wrote:

I am using Graphx with java. I want to use the Graph.mapVertices() method and I need to pass Predef.$eq$colon$eq<VD,VD2> argument.

Sure.

class Leibniz {
  static <T> scala.Predef.$eq$colon$eq<T, T> reflexivity() {
    return scala.Predef.$eq$colon$eq$.MODULE$.tpEquals();
  }
}


--
Stephen Compall

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Predef.$eq$colon$eq<A,B>

Jasper-M
s/VD1/VD2/g of course.

Op vrijdag 10 maart 2017 12:50:58 UTC+1 schreef Jasper-M:
I assume VD2 is a type variable?

Then you have to do either of these:

1) Pass the reference around:

public <VD1> void myGenericMethod(VD1 vd, $eq$colon$eq<String,VD1> ev) {
  mapVertices(..., ev);
}

public void myMethod() {
  String vd = "VD";
  myGenericMethod(vd, Predef1.reflexivity());
}

2) Cast the reference:

public <VD1> void myMethod() {
  Object obj = Predef1.reflexivity();
  scala.Predef.$eq$colon$eq<String,VD1> ev = (scala.Predef.$eq$colon$eq<String,VD1>) obj;
  mapVertices(..., ev);
}

Op vrijdag 10 maart 2017 10:07:19 UTC+1 schreef [hidden email]:
Thank you,
I created a class Predef1:
public class Predef1 {
 static public <T> scala.Predef.$eq$colon$eq<T, T> reflexivity() {
   return scala.Predef.$eq$colon$eq$.MODULE$.tpEquals();
 }
}
and I use Predef1.reflexivity() to pass th argument but I have this error:
The method mapVertices(..., Predef.$eq$colon$eq<String,VD2>) is not applicable for the argument (..., Predef.$eq$colon$eq<Object,Object>)
I need to pass an argument Predef.$eq$colon$eq<String,VD2>

Le vendredi 10 mars 2017 01:27:36 UTC+1, Stephen Compall a écrit :

On 3/9/17 1:29 PM, [hidden email] wrote:

I am using Graphx with java. I want to use the Graph.mapVertices() method and I need to pass Predef.$eq$colon$eq<VD,VD2> argument.

Sure.

class Leibniz {
  static <T> scala.Predef.$eq$colon$eq<T, T> reflexivity() {
    return scala.Predef.$eq$colon$eq$.MODULE$.tpEquals();
  }
}


--
Stephen Compall

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.