title: Convert kotlin to java to pass to Firestore
body: <p>I would like to use this methods I used on a kotlin file in a java file, unfortuanetly I don't know how to do it in java. Could someone help me please?</p>
  
  <p>Kotlin code to change to Java:</p>
  
  <pre><code>val progressDialog = indeterminateProgressDialog("Setting up your module")
              FirestoreUtil.getImportModules(ID, applicationContext) {
                  val intent = Intent(this@AddModActivity, EditImportUserActivity::class.java)
                  intent.putExtra("moduleID", ID)
                  intent.putExtra("moduleCode", code)
                  intent.putExtra("moduleName", name)
                  startActivity(intent)
                  progressDialog.dismiss()
              }
  </code></pre>
  
  <p>It calls this method in firstore util ( does not need to change)</p>
  
  <pre><code>fun getImportModules(String: String = "", context : Context, onComplete: () -&gt; Unit) {
      firestoreInstance.collection("assessment").whereEqualTo("module", String).get()
              .addOnSuccessListener { documentSnapshot -&gt;
                  lateinit var realm: Realm
                  Realm.init(context)
                  val defaultConfig = RealmConfiguration.Builder()
                          .schemaVersion(0)
                          .build()
                  realm = Realm.getInstance(defaultConfig)
                  val results = realm.where(Assessment::class.java).findAll()
                  realm.executeTransaction {
                      results.deleteAllFromRealm()
                  }
                  if (documentSnapshot.isEmpty) {
                      onComplete()
                  }
                  else
                  {
                      documentSnapshot!!.documents.forEach {
                          val s = Assessment(Double.parseDouble(it.get("achieved")!!.toString()),
                                  it.get("date")!!.toString(), it.get("desc")!!.toString(), it.get("module")!!.toString(),
                                  it.get("time")!!.toString(), Double.parseDouble(it.get("total")!!.toString()), it.get("type")!!.toString(),
                                  it.get("weight")!!.toString())
                          //SAVE
                          val helper = RealmHelper(realm)
                          helper.save(s)
                      }
                      onComplete()
                  }
              }
  }
  </code></pre>
  
  <p>I know how to make the progress dialog and intent, what I don't know how to do is pass the intent through to the methods <code>onComplete()</code>.</p>
  
  <p>Thank you in advance</p>