Skip to content

Commit

Permalink
add missing toString overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
pjazdzyk committed Feb 16, 2023
1 parent 489c8ac commit cb8dbef
Show file tree
Hide file tree
Showing 26 changed files with 97 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public AirFlowFactory(DryAirProperties dryAirProperties) {
}

public Either<InvalidFlow, FlowOfDryAir> createFlowOfDryAir(Pressure pressure, Temperature temperature, MassFlow massFlow) {
LOGGER.info("Trying to create instance of dry air");
LOGGER.info("Trying to create instance of dry air with parameters: Ps={}, ta={}, mda={}",pressure.toPascal(), temperature.toCelsius(), massFlow.toKiloGramPerSecond());
return dryAirProperties.density(temperature, pressure)
.mapLeft(l -> {
LOGGER.error("Flow cannot be created due to invalid density.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,9 @@ static Either<InvalidDensity, KiloGramPerCubicMeter> of(double value){
: Either.right(new KiloGramPerCubicMeter(value));
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ static PoundPerCubicFoot of(double value) {
return new PoundPerCubicFoot(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ static KiloGramPerMeterSecond of(double value){
return new KiloGramPerMeterSecond(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ static PascalSecond of(double value){
return new PascalSecond(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ static Poise of(double value){
return new Poise(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ static SquareInchPerSecond of(double value){
return new SquareInchPerSecond(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ static SquareMeterPerSecond of(double value){
return new SquareMeterPerSecond(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,9 @@ public int hashCode() {
static KiloGramPerHour of(double value){
return new KiloGramPerHour(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,9 @@ static KiloGramPerSecond of(double value){
return new KiloGramPerSecond(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ static PoundPerSecond of(double value) {
return new PoundPerSecond(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
4 changes: 4 additions & 0 deletions src/main/java/com/synerset/unitsystem/power/BtuPerHour.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ static BtuPerHour of(double value){
return new BtuPerHour(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
4 changes: 4 additions & 0 deletions src/main/java/com/synerset/unitsystem/power/KiloWatt.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ static KiloWatt of(double value) {
return new KiloWatt(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
4 changes: 4 additions & 0 deletions src/main/java/com/synerset/unitsystem/power/Watt.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ static Watt of(double value) {
return new Watt(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
4 changes: 4 additions & 0 deletions src/main/java/com/synerset/unitsystem/pressure/Bar.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,8 @@ static Bar of(double value) {
return new Bar(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,8 @@ static HectoPascal of(double value) {
return new HectoPascal(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,8 @@ public static MegaPascal of(double value) {
return new MegaPascal(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
6 changes: 5 additions & 1 deletion src/main/java/com/synerset/unitsystem/pressure/Pascal.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,8 @@ static Pascal of(double value){
return new Pascal(value);
}

}
@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
4 changes: 4 additions & 0 deletions src/main/java/com/synerset/unitsystem/pressure/Psi.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,8 @@ static Psi of(double value){
return new Psi(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ static JoulePerKiloGram of(double value){
return new JoulePerKiloGram(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ static KiloJoulePerKiloGram of(double value){
return new KiloJoulePerKiloGram(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ static Either<InvalidTemperature, Celsius> of(double value) {

@Override
public String toString() {
return value + ", " + DEF_SYMBOL;
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static Either<InvalidTemperature, Fahrenheit> of(double value) {

@Override
public String toString() {
return value + ", " + DEF_SYMBOL;
return value + DEF_SYMBOL;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ static Either<InvalidTemperature, Kelvin> of(double value) {

@Override
public String toString() {
return value + ", " + DEF_SYMBOL;
return value + DEF_SYMBOL;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ static BtuPerHourFootFahrenheit of(double value) {
return new BtuPerHourFootFahrenheit(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,8 @@ static WattPerMeterKelvin of(double value) {
return new WattPerMeterKelvin(value);
}

@Override
public String toString() {
return value + DEF_SYMBOL;
}
}

0 comments on commit cb8dbef

Please sign in to comment.