From 5f45c4e5dd3ec0b0cd6b999c4481303210f2f914 Mon Sep 17 00:00:00 2001 From: hjorthjort Date: Fri, 2 Oct 2015 19:45:08 +0200 Subject: [PATCH] Add @since tag to all classes --- .../commutity/infrastructure/WifiHelperTest.java | 1 + .../infrastructure/api/JsonJavaConverterTest.java | 2 +- .../alive_n_clickin/commutity/infrastructure/GpsState.java | 1 + .../commutity/infrastructure/NearbyVehiclesScanner.java | 1 + .../commutity/infrastructure/WifiBroadcastReceiver.java | 1 + .../commutity/infrastructure/WifiHelper.java | 1 + .../commutity/infrastructure/api/ApiAdapterFactory.java | 1 + .../commutity/infrastructure/api/ApiConnection.java | 1 + .../commutity/infrastructure/api/ElectricityAdapter.java | 5 ++++- .../commutity/infrastructure/api/IElectricityAdapter.java | 1 + .../commutity/infrastructure/api/IVasttrafikAdapter.java | 1 + .../commutity/infrastructure/api/JsonJavaConverter.java | 1 + .../commutity/infrastructure/api/LocationList.java | 1 + .../alive_n_clickin/commutity/infrastructure/api/Stop.java | 1 + .../commutity/infrastructure/api/VasttrafikAdapter.java | 1 + .../infrastructure/api/VasttrafikApiConnection.java | 1 + .../commutity/presentation/flagreport/FlagButton.java | 1 + .../commutity/presentation/flagreport/FlagVehicle.java | 1 + .../presentation/flagreport/FlagVehicleDetailFragment.java | 1 + .../presentation/flagreport/FlagVehicleFragment.java | 1 + .../commutity/presentation/flagreport/FlagViewAdapter.java | 1 + .../presentation/flagreport/WifiChangeListener.java | 1 + .../commutity/presentation/main/MainActivity.java | 7 ++++--- .../commutity/presentation/main/MainFragment.java | 1 + .../commutity/presentation/search/SearchFragment.java | 1 + .../commutity/presentation/search/SearchResultAdapter.java | 1 + .../java/com/alive_n_clickin/commutity/util/FlagType.java | 1 + .../java/com/alive_n_clickin/commutity/util/LogUtils.java | 2 ++ 28 files changed, 35 insertions(+), 5 deletions(-) diff --git a/app/src/androidTest/java/com/alive_n_clickin/commutity/infrastructure/WifiHelperTest.java b/app/src/androidTest/java/com/alive_n_clickin/commutity/infrastructure/WifiHelperTest.java index 353f470f..4698fed3 100644 --- a/app/src/androidTest/java/com/alive_n_clickin/commutity/infrastructure/WifiHelperTest.java +++ b/app/src/androidTest/java/com/alive_n_clickin/commutity/infrastructure/WifiHelperTest.java @@ -12,6 +12,7 @@ /** * @author hjorthjort * Created 29/09/15 + * @since 0.1 */ public class WifiHelperTest extends AndroidTestCase { diff --git a/app/src/androidTest/java/com/alive_n_clickin/commutity/infrastructure/api/JsonJavaConverterTest.java b/app/src/androidTest/java/com/alive_n_clickin/commutity/infrastructure/api/JsonJavaConverterTest.java index b4abb333..1404d007 100644 --- a/app/src/androidTest/java/com/alive_n_clickin/commutity/infrastructure/api/JsonJavaConverterTest.java +++ b/app/src/androidTest/java/com/alive_n_clickin/commutity/infrastructure/api/JsonJavaConverterTest.java @@ -2,12 +2,12 @@ import android.test.AndroidTestCase; -import com.alive_n_clickin.commutity.infrastructure.api.JsonJavaConverter; import com.google.gson.internal.LinkedTreeMap; /** * @author hjorthjort * Created 22/09/15 + * @since 0.1 */ public class JsonJavaConverterTest extends AndroidTestCase { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/GpsState.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/GpsState.java index a4c0aca2..f35ab7a5 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/GpsState.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/GpsState.java @@ -12,6 +12,7 @@ /** * + * @since 0.1 */ public class GpsState implements LocationListener{ private static GpsState instance; diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/NearbyVehiclesScanner.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/NearbyVehiclesScanner.java index c9ac0c9b..34cdb2d7 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/NearbyVehiclesScanner.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/NearbyVehiclesScanner.java @@ -13,6 +13,7 @@ * Created 24/09/15 * * Class for finding nearby vehicles based on wifi position. + * @since 0.1 */ public class NearbyVehiclesScanner { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/WifiBroadcastReceiver.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/WifiBroadcastReceiver.java index 1e252d7d..c7d3a8e0 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/WifiBroadcastReceiver.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/WifiBroadcastReceiver.java @@ -12,6 +12,7 @@ /** * @author hjorthjort * Created 26/09/15 + * @since 0.1 */ public class WifiBroadcastReceiver extends BroadcastReceiver { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/WifiHelper.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/WifiHelper.java index 30b47844..9b3a01c2 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/WifiHelper.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/WifiHelper.java @@ -14,6 +14,7 @@ * Created 24/09/15 * * Singleton tool for getting wifi information + * @since 0.1 */ public class WifiHelper { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ApiAdapterFactory.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ApiAdapterFactory.java index a7dee2c5..d1706a28 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ApiAdapterFactory.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ApiAdapterFactory.java @@ -9,6 +9,7 @@ * The current adapters are: * {@link IVasttrafikAdapter} * {@link IElectricityAdapter} + * @since 0.1 */ public class ApiAdapterFactory { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ApiConnection.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ApiConnection.java index 94b53962..02957a59 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ApiConnection.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ApiConnection.java @@ -11,6 +11,7 @@ * * For connecting to different API:s. Allows abstraction by letting us send only the query parameters to the api we want, not bothering about authentication and the likes. * ApiConnection is package private: no need for layers higher up to use it directly! + * @since 0.1 */ class ApiConnection { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ElectricityAdapter.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ElectricityAdapter.java index db06b872..f5ecd426 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ElectricityAdapter.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/ElectricityAdapter.java @@ -1,6 +1,9 @@ package com.alive_n_clickin.commutity.infrastructure.api; - +/** + * + * @since 0.1 + */ class ElectricityAdapter implements IElectricityAdapter { } diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/IElectricityAdapter.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/IElectricityAdapter.java index 65f3d5c7..90f87784 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/IElectricityAdapter.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/IElectricityAdapter.java @@ -4,6 +4,7 @@ /** * This interface represent the possible request to the Electricity API combined with their responses. + * @since 0.1 */ public interface IElectricityAdapter { } diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/IVasttrafikAdapter.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/IVasttrafikAdapter.java index fd58e61d..3aadce01 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/IVasttrafikAdapter.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/IVasttrafikAdapter.java @@ -4,6 +4,7 @@ /** * This interface represent the possible request to the Vasttrafik API combined with their responses. + * @since 0.1 */ public interface IVasttrafikAdapter { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/JsonJavaConverter.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/JsonJavaConverter.java index ebfe3763..c31338d7 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/JsonJavaConverter.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/JsonJavaConverter.java @@ -12,6 +12,7 @@ * Methods for parsing JSON in to Java Objects of a given class, and vice versa * * Package private, this class handles low level functionality, and should not be visible to other packages. + * @since 0.1 */ class JsonJavaConverter { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/LocationList.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/LocationList.java index 478ff4cd..53c66ad5 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/LocationList.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/LocationList.java @@ -4,6 +4,7 @@ /** * This class models the response from the Vasttrafik API and is used within {@link JsonJavaConverter} to convert into a java object. + * @since 0.1 */ public class LocationList { private String noNamespaceSchemaLocation; diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/Stop.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/Stop.java index d1353645..5ef0ad58 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/Stop.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/Stop.java @@ -10,6 +10,7 @@ * so it can be sent in intents, bundles, etc. * * The class is used within {@link JsonJavaConverter} to convert the json into a java object. + * @since 0.1 */ @ToString public class Stop implements Serializable { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/VasttrafikAdapter.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/VasttrafikAdapter.java index ac09bc34..a38aaeeb 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/VasttrafikAdapter.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/VasttrafikAdapter.java @@ -10,6 +10,7 @@ * Use the ApiAdapterFactory to gain access to this class. {@link ApiAdapterFactory} * * This class is used to create a suitable request string, which is then passed along to {@link VasttrafikApiConnection} + * @since 0.1 */ class VasttrafikAdapter implements IVasttrafikAdapter { private final VasttrafikApiConnection vasttrafikApiConnection = new VasttrafikApiConnection(); diff --git a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/VasttrafikApiConnection.java b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/VasttrafikApiConnection.java index 6a08e723..d6bb5cf0 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/VasttrafikApiConnection.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/infrastructure/api/VasttrafikApiConnection.java @@ -14,6 +14,7 @@ * This class creates a valid http connection for the Vasttrafik API, which is then passed along to {@link ApiConnection}. * * The class is not meant to be instantiated directly. It's only used within {@link VasttrafikAdapter} to remove coupling. + * @since 0.1 */ class VasttrafikApiConnection { private static final String BASE_URL_VASTTRAFIK = diff --git a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagButton.java b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagButton.java index f1d7e5fb..69fdc5d9 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagButton.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagButton.java @@ -6,6 +6,7 @@ * A class containing data for a flag button. The button consists visually of an image and a * description, and these are stored as a resource ID and a string. The type of flag is also * stored here. + * @since 0.1 */ public class FlagButton{ private int imageID; diff --git a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicle.java b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicle.java index 5a7b1ffd..88605a41 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicle.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicle.java @@ -10,6 +10,7 @@ * The main activity for the flag setting tool. The activity doesn't have any visual elements itself, * besides a frame which contains different fragments. The activity extends FragmentActivity to ensure * that switching fragments is pain free. + * @since 0.1 */ public class FlagVehicle extends FragmentActivity { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicleDetailFragment.java b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicleDetailFragment.java index 7d1f493e..f755fe38 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicleDetailFragment.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicleDetailFragment.java @@ -26,6 +26,7 @@ * A class for showing the detailed view when flagging a vehicle. The view contains a flag, its name, * a comment field and a button for sending the flag. This fragment class handles then visual elements * of this. + * @since 0.1 */ public class FlagVehicleDetailFragment extends Fragment { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicleFragment.java b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicleFragment.java index 180368ed..460d19be 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicleFragment.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagVehicleFragment.java @@ -24,6 +24,7 @@ /** * The view with several different flags available for the user to flag vehicles. Launches a detailed * view when the user clicks on a flag + * @since 0.1 */ public class FlagVehicleFragment extends Fragment implements WifiChangeListener { final static String ARG_POSITION = "position"; diff --git a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagViewAdapter.java b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagViewAdapter.java index a14d9c89..ae234ee3 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagViewAdapter.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/FlagViewAdapter.java @@ -16,6 +16,7 @@ /** * An adapter for transforming flag data into a grid view + * @since 0.1 */ public class FlagViewAdapter extends BaseAdapter { private Context currentContext; diff --git a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/WifiChangeListener.java b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/WifiChangeListener.java index 7113fb58..b6976950 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/WifiChangeListener.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/presentation/flagreport/WifiChangeListener.java @@ -3,6 +3,7 @@ /** * @author hjorthjort * Created 26/09/15 + * @since 0.1 */ public interface WifiChangeListener { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/presentation/main/MainActivity.java b/app/src/main/java/com/alive_n_clickin/commutity/presentation/main/MainActivity.java index 84964d33..14a11d2b 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/presentation/main/MainActivity.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/presentation/main/MainActivity.java @@ -6,17 +6,18 @@ import android.support.v4.app.FragmentTransaction; import android.view.View; -import lombok.Setter; -import lombok.Getter; - import com.alive_n_clickin.commutity.R; import com.alive_n_clickin.commutity.infrastructure.api.Stop; import com.alive_n_clickin.commutity.presentation.flagreport.FlagVehicle; import com.alive_n_clickin.commutity.presentation.search.SearchFragment; +import lombok.Getter; +import lombok.Setter; + /** * This class handles the first view presented to the user. It has a content frame to hold different * fragments. + * @since 0.1 */ public class MainActivity extends FragmentActivity { @Getter @Setter private Stop currentStop; diff --git a/app/src/main/java/com/alive_n_clickin/commutity/presentation/main/MainFragment.java b/app/src/main/java/com/alive_n_clickin/commutity/presentation/main/MainFragment.java index 9e7d746e..29692097 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/presentation/main/MainFragment.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/presentation/main/MainFragment.java @@ -13,6 +13,7 @@ /** * This class handles the first view presented to the user. It holds the stop the user has selected, * as well as handling the switching to the search fragment when the user presses the stop text view. + * @since 0.1 */ public class MainFragment extends Fragment { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/presentation/search/SearchFragment.java b/app/src/main/java/com/alive_n_clickin/commutity/presentation/search/SearchFragment.java index 65c66f38..8478c40a 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/presentation/search/SearchFragment.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/presentation/search/SearchFragment.java @@ -27,6 +27,7 @@ /** * A fragment for the search function. Contains a edit text field for inputting a search term * and a list containing the results + * @since 0.1 */ public class SearchFragment extends Fragment { SearchView search; diff --git a/app/src/main/java/com/alive_n_clickin/commutity/presentation/search/SearchResultAdapter.java b/app/src/main/java/com/alive_n_clickin/commutity/presentation/search/SearchResultAdapter.java index 857118a7..ab859947 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/presentation/search/SearchResultAdapter.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/presentation/search/SearchResultAdapter.java @@ -14,6 +14,7 @@ /** * Converts the stop to a string to display in a view, i.e. the search result list + * @since 0.1 */ public class SearchResultAdapter extends ArrayAdapter { public SearchResultAdapter(Context context, List result) { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/util/FlagType.java b/app/src/main/java/com/alive_n_clickin/commutity/util/FlagType.java index 8f5d4130..b613591d 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/util/FlagType.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/util/FlagType.java @@ -2,6 +2,7 @@ /** * The different flag types available + * @since 0.1 */ public enum FlagType { diff --git a/app/src/main/java/com/alive_n_clickin/commutity/util/LogUtils.java b/app/src/main/java/com/alive_n_clickin/commutity/util/LogUtils.java index efd0e841..2c5ad796 100644 --- a/app/src/main/java/com/alive_n_clickin/commutity/util/LogUtils.java +++ b/app/src/main/java/com/alive_n_clickin/commutity/util/LogUtils.java @@ -3,6 +3,8 @@ /** * @author hjorthjort * Created 22/09/15 + * + * @since 0.1 */ public class LogUtils { public static String getLogTag(Object caller) {