Skip to content

Commit

Permalink
Merge branch 'release/v1.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
emersonf committed Aug 15, 2015
2 parents dd2bfa8 + 1b0e85b commit 68903af
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 24 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ jdk:
notifications:
slack:
secure: UjSpOIXxnH3JLZc109j+EzVwzVVvlNPsFoTRUf9uSfkwSCcAU/UQGOennJANOgloFychYl+YytWF9+Qi9AfF5OyFsXWqs4cx8CylQlN9YbEzUkCtGt4CX1AZqUCiH9oAzSExIS8FTpn/Viu8YtF91djaMdX5s+Nfj9IcVwWbrUE=
sudo: false
2 changes: 1 addition & 1 deletion java-schema-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray' // see https://github.com/bintray/gradle-bintray-plugin for details

archivesBaseName = 'omh-schema-sdk'
version = '1.0.2'
version = '1.0.3'

ext {
jacksonVersion = '2.5.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class BloodGlucose extends Measure {
protected BloodGlucose() {
}

public static class Builder extends Measure.Builder<Builder> {
public static class Builder extends Measure.Builder<BloodGlucose, Builder> {

private TypedUnitValue<BloodGlucoseUnit> bloodGlucose;
private BloodSpecimenType bloodSpecimenType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class BloodPressure extends Measure {
protected BloodPressure() {
}

public static class Builder extends Measure.Builder<Builder> {
public static class Builder extends Measure.Builder<BloodPressure, Builder> {

private SystolicBloodPressure systolicBloodPressure;
private DiastolicBloodPressure diastolicBloodPressure;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class BodyHeight extends Measure {
protected BodyHeight() {
}

public static class Builder extends Measure.Builder<Builder> {
public static class Builder extends Measure.Builder<BodyHeight, Builder> {

private LengthUnitValue bodyHeight;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class BodyMassIndex extends Measure {
protected BodyMassIndex() {
}

public static class Builder extends Measure.Builder<Builder> {
public static class Builder extends Measure.Builder<BodyMassIndex, Builder> {

private TypedUnitValue<BodyMassIndexUnit> bodyMassIndex;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class BodyWeight extends Measure {
protected BodyWeight() {
}

public static class Builder extends Measure.Builder<Builder> {
public static class Builder extends Measure.Builder<BodyWeight, Builder> {

private MassUnitValue bodyWeight;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class CaloriesBurned extends Measure {
protected CaloriesBurned() {
}

public static class Builder extends Measure.Builder<Builder> {
public static class Builder extends Measure.Builder<CaloriesBurned, Builder> {

private KcalUnitValue kcalBurned;
private String activityName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class HeartRate extends Measure {
protected HeartRate() {
}

public static class Builder extends Measure.Builder<Builder> {
public static class Builder extends Measure.Builder<HeartRate, Builder> {

private TypedUnitValue<HeartRateUnit> heartRate;
private TemporalRelationshipToPhysicalActivity temporalRelationshipToPhysicalActivity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,38 @@ public abstract class Measure implements SchemaSupport, AdditionalPropertySuppor


@SuppressWarnings("unchecked")
public static abstract class Builder<T extends Builder<?>> {
public static abstract class Builder<M extends Measure, B extends Builder<M,B>> {

private TimeFrame effectiveTimeFrame;
private DescriptiveStatistic descriptiveStatistic;
private String userNotes;

public T setEffectiveTimeFrame(TimeFrame effectiveTimeFrame) {
public B setEffectiveTimeFrame(TimeFrame effectiveTimeFrame) {
this.effectiveTimeFrame = effectiveTimeFrame;
return (T) this;
return (B) this;
}

public T setEffectiveTimeFrame(TimeInterval timeInterval) {
public B setEffectiveTimeFrame(TimeInterval timeInterval) {
this.effectiveTimeFrame = new TimeFrame(timeInterval);
return (T) this;
return (B) this;
}

public T setEffectiveTimeFrame(OffsetDateTime dateTime) {
public B setEffectiveTimeFrame(OffsetDateTime dateTime) {
this.effectiveTimeFrame = new TimeFrame(dateTime);
return (T) this;
return (B) this;
}

public T setDescriptiveStatistic(DescriptiveStatistic descriptiveStatistic) {
public B setDescriptiveStatistic(DescriptiveStatistic descriptiveStatistic) {
this.descriptiveStatistic = descriptiveStatistic;
return (T) this;
return (B) this;
}

public T setUserNotes(String userNotes) {
public B setUserNotes(String userNotes) {
this.userNotes = userNotes;
return (T) this;
return (B) this;
}

public abstract Measure build();
public abstract M build();
}

@SerializationConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class MinutesModerateActivity extends Measure {
protected MinutesModerateActivity() {
}

public static class Builder extends Measure.Builder<Builder> {
public static class Builder extends Measure.Builder<MinutesModerateActivity, Builder> {

private DurationUnitValue minutesModerateActivity;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static SelfReportedIntensity findBySchemaValue(String schemaValue) {
protected PhysicalActivity() {
}

public static class Builder extends Measure.Builder<Builder> {
public static class Builder extends Measure.Builder<PhysicalActivity, Builder> {

private String activityName;
private LengthUnitValue distance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class SleepDuration extends Measure {
protected SleepDuration() {
}

public static class Builder extends Measure.Builder<Builder> {
public static class Builder extends Measure.Builder<SleepDuration, Builder> {

private DurationUnitValue sleepDuration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class StepCount extends Measure {
protected StepCount() {
}

public static class Builder extends Measure.Builder<Builder> {
public static class Builder extends Measure.Builder<StepCount, Builder> {

private BigDecimal stepCount;

Expand Down

0 comments on commit 68903af

Please sign in to comment.