Android Open Source - infinitep Movement Summary






From Project

Back to project page infinitep.

License

The source code is released under:

Apache License

If you think the Android project infinitep listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package es.daconstenla.infinip.database;
/* ww w  . j  av a2 s.  c  o m*/
import android.util.Log;
import es.daconstenla.infinip.database.utils.Utils;

public class MovementSummary {

  public static boolean DEBUG = false;
  public long id;
  public String date;
  public String timeStart;
  public String timeEnd;
  public long dateTimeStart;
  public long dateTimeEnd;
  public long duration;
  public int type;

  public MovementSummary(){}
  public MovementSummary(long identifier){
    id = identifier;
  }
  public MovementSummary(long identifier,String dateMovement, String timeStartMovement, String timeEndMovement,  int typeMovement, long dur){
    _init_(identifier,dateMovement, timeStartMovement, timeEndMovement,  typeMovement,dur);
  }
  public MovementSummary(long identifier,String dateMovement, String timeStartMovement, String timeEndMovement,  int typeMovement){
    _init_(identifier,dateMovement, timeStartMovement, timeEndMovement,  typeMovement, Long.MIN_VALUE);
  }
  public MovementSummary(String dateMovement, String timeStartMovement, String timeEndMovement, int typeMovement){
    _init_(Integer.MIN_VALUE,dateMovement, timeStartMovement, timeEndMovement,  typeMovement, Long.MIN_VALUE);
  }
  private void _init_(long identifier,String dateMovement, String timeStartMovement, String timeEndMovement,  int typeMovement, long dur){
    if(DEBUG)Log.d(this.getClass().getName(),
                        "id "  +  String.valueOf(identifier) +
                        "date"  +   dateMovement +
                        "ini"  +   timeStartMovement +
                        "end"  +   timeEndMovement +
                        "typ"  +   String.valueOf(typeMovement) +
                        "dur"  +   String.valueOf(dur)
                        );
    
    if(identifier==Integer.MIN_VALUE) id = -1;
    else id = identifier;
    
    dateTimeStart = Utils.createDateInMilisFromStrings(dateMovement,timeStartMovement);
    dateTimeEnd = Utils.createDateInMilisFromStrings(dateMovement,timeEndMovement);
    date = dateMovement;
    timeStart = timeStartMovement;
    timeEnd = timeEndMovement;
    
    if(dur==Long.MIN_VALUE) duration = dateTimeEnd - dateTimeStart; 
    else duration = dur;
    
    type = typeMovement;
  }
  
  public String toString(){
    String toret = "";
    
    toret = "id "  +  String.valueOf(id) +
        "date"  +   date +
        "ini"  +   String.valueOf(dateTimeStart) +
        "end"  +   String.valueOf(dateTimeEnd) +
        "typ"  +   String.valueOf(type) +
        "dur"  +   String.valueOf(duration);
    
    return toret;
  }
}




Java Source Code List

com.example.databasetest.FullscreenActivity.java
com.example.databasetest.util.SystemUiHiderBase.java
com.example.databasetest.util.SystemUiHiderHoneycomb.java
com.example.databasetest.util.SystemUiHider.java
com.example.datatest.MainActivity.java
com.example.datatest.database.InfinitepHelper.java
com.example.datatest.database.MovementRaw.java
com.example.datatest.database.MovementSummary.java
com.example.datatest.database.TableMovementRaw.java
com.example.datatest.database.TableMovementSummary.java
com.example.datatest.databaseTest.DatabaseTester.java
com.example.datatest.util.Utils.java
es.daconstenla.infinip.activity.CalendarActivity.java
es.daconstenla.infinip.activity.DayActivity.java
es.daconstenla.infinip.activity.MainActivity.java
es.daconstenla.infinip.activity.RangeActivity.java
es.daconstenla.infinip.activity.SettingsActivity.java
es.daconstenla.infinip.activity.SplashActivity.java
es.daconstenla.infinip.activity.SyncActivity.java
es.daconstenla.infinip.customcomponents.HorizontalGraph.java
es.daconstenla.infinip.customcomponents.InformationBox.java
es.daconstenla.infinip.customcomponents.MonthFragmentTest.java
es.daconstenla.infinip.customcomponents.MonthFragment.java
es.daconstenla.infinip.customcomponents.MonthView.java
es.daconstenla.infinip.customcomponents.MyFragmentMonthAdapter.java
es.daconstenla.infinip.customcomponents.events.OnSwipeTouchListener.java
es.daconstenla.infinip.customcomponents.pieces.ElementBackground.java
es.daconstenla.infinip.customcomponents.pieces.HorGraphBar.java
es.daconstenla.infinip.customcomponents.pieces.ItemCalendarDay.java
es.daconstenla.infinip.customcomponents.pieces.data.BarElementData.java
es.daconstenla.infinip.customcomponents.pieces.data.ColorMyCustom.java
es.daconstenla.infinip.customcomponents.pieces.data.CustomScrollView.java
es.daconstenla.infinip.customcomponents.pieces.data.ItemHorizontalBar.java
es.daconstenla.infinip.database.InfinitepHelper.java
es.daconstenla.infinip.database.MovementRaw.java
es.daconstenla.infinip.database.MovementSummary.java
es.daconstenla.infinip.database.TableMovementRaw.java
es.daconstenla.infinip.database.TableMovementSummary.java
es.daconstenla.infinip.database.utils.Utils.java
es.daconstenla.infinip.unused.AutoResizeTextView.java