This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExampleClient { | |
@AnyThread | |
public ExampleClient(Context context, @NonNull Configuration config) { | |
} | |
@UiThread | |
public void doSomething() { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// don't do this | |
public ExampleClient(Context context, Configuration config) { | |
} | |
// do this | |
public ExampleClient(Context context, @NonNull Configuration config) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExampleClient { | |
public static final String ENVIRONMENT_DEV = "DEV"; | |
public static final String ENVIRONMENT_PROD = "PROD"; | |
public static final String ENVIRONMENT_STAGING = "STG"; | |
@Retention(RetentionPolicy.SOURCE) | |
@StringDef({ENVIRONMENT_DEV, ENVIRONMENT_PROD, ENVIRONMENT_STAGING}) | |
public @interface Environment { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExampleClient { | |
public static enum Environment { | |
DEV, STAGING, PROD | |
} | |
private ExampleClient(Context context, String key, int logLevel, Environment environment) { | |
} | |
private static Builder { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Configuration(val context: Context, val key: String) { | |
var environment: String = "dev" | |
} | |
public ExampleClient(Context context, Configuration config) { | |
} | |
//initialisation | |
val config = Configuration(context, key) | |
config.environment = "prod" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExampleClient { | |
private Context context; | |
private String key; | |
private int logLevel; | |
private String environment; | |
public ExampleClient(Context context, String key, int logLevel, String environment) { | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExampleClient { | |
private ExampleClient(Context context, String key, int logLevel, String environment) { | |
} | |
private static Builder { | |
private Context context; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mmaug.rxsunshine; | |
import android.os.Bundle; | |
import android.support.v4.app.Fragment; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mmaug.rxsunshine; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ImageView; | |
import android.widget.TextView; | |
import com.squareup.picasso.Picasso; | |
import java.util.ArrayList; |
NewerOlder