Skip to content

Commit

Permalink
#459 new method
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Nov 8, 2017
1 parent d324b97 commit e263590
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/cactoos/scalar/BoolOf.java
Expand Up @@ -52,10 +52,10 @@ public final class BoolOf implements Scalar<Boolean> {
/**
* Ctor.
*
* @param string True or false string
* @param txt True or false string
*/
public BoolOf(final String string) {
this(new TextOf(string));
public BoolOf(final String txt) {
this(new TextOf(txt));
}

/**
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/org/cactoos/scalar/SumOf.java
Expand Up @@ -47,7 +47,7 @@
* @version $Id$
* @since 0.9
*/
public final class SumOf extends Number {
public final class SumOf extends Number implements Scalar<Number> {

/**
* Serialization marker.
Expand Down Expand Up @@ -199,4 +199,10 @@ public float floatValue() {
public double doubleValue() {
return new UncheckedScalar<>(this.dsum).value();
}

@Override
public Number value() {
return this;
}

}

0 comments on commit e263590

Please sign in to comment.