i start using kotlin , defined interface this: interface aadapter<vh : recyclerview.viewholder> { fun oncreateaviewholder(parent: viewgroup): vh fun onbindaviewholder(v: vh, position: int) } and when try use on code: class klasa ( private val adapter: aadapter<*> ) { fun dosth(){ //... val vh = this.adapter.oncreateaviewholder(parent) //on below line error adapter.onbindaviewholder(v, position) //... } } i error out-projected type 'aadapter<*>' prohibits use of 'public abstract fun onbindaviewholder(v: t, position: int): unit i tied add "in" or "out" definition i'm confused. how allow it. replace aadapter<*> aadapter<recyclerview.viewholder> . class klasa ( private val adapter: aadapter<recyclerview.viewholder> ) { // ... because have declared aadapter has type parameter vh type subclass of recyclerview....
i using elastic search hibernate search.i want make 1 property data type geo_point ,so can draw tile map using kibana.is there equivalent data type in hibernate search geo_point in elastic search? you can use spatial feature of hibernate search: import org.hibernate.search.annotations.*; @entity @indexed @spatial public class hotel { @latitude double latitude @longitude double longitude // ... } you end geo_point field named location in document. for more information: https://docs.jboss.org/hibernate/stable/search/reference/en-us/html_single/#spatial wiki
Comments
Post a Comment