Skip to content

Commit

Permalink
#33 Partial
Browse files Browse the repository at this point in the history
  • Loading branch information
Alok Shukla committed Nov 21, 2013
1 parent dec7f98 commit 29dfaf9
Show file tree
Hide file tree
Showing 9 changed files with 540 additions and 490 deletions.
4 changes: 0 additions & 4 deletions bin/surefire-reports/test.java.BigTest.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.bigNumber.common.interfaces;

import org.bigNumber.models.BigNumber;

import java.io.Serializable;

/**
* @author aloks
* Date: 21/11/13
* Time: 6:06 PM
* @since 2.0.0
*/
public interface NonStaticMethods extends Comparable<BigNumber>, Serializable {
}
10 changes: 10 additions & 0 deletions src/main/java/org/bigNumber/common/interfaces/StaticMethods.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.bigNumber.common.interfaces;

/**
* @author aloks
* Date: 21/11/13
* Time: 6:05 PM
* @since 2.0.0
*/
public interface StaticMethods {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.MathContext;
import java.util.List;

import org.bigNumber.models.BigNumber;
Expand Down Expand Up @@ -112,10 +113,10 @@ public interface UtilityMethods extends Comparable<BigNumber>, Serializable{
/**
* Rounds off a number to the given number of digits
* @author Nishi Inc.
* @param numberOfDigitsAfterDecimal
* @param mathContext
* @since August 8, 2013, v0.1.0
*/
public void roundOff(Integer numberOfDigitsAfterDecimal);
public void roundOff(MathContext mathContext);

/**
* Rounds off a number to the number of digits specified by GlobalConstants.DEFAULT_ROUND_OFF_DIGITS
Expand Down
19 changes: 19 additions & 0 deletions src/main/java/org/bigNumber/common/services/BigNumberUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.bigNumber.common.services;

import org.bigNumber.common.interfaces.StaticMethods;

/**
* @author aloks
* Date: 21/11/13
* Time: 3:35 PM
* @since 2.0.0
*/
public final class BigNumberUtils implements StaticMethods {
// TODO Keep two interfaces StaticMethods and NonStaticMethods
// TODO #33 : BigNumberUtil will implement StaticMethods while BigNumberParent will implement NonStaticMethods which extends Serializable and Comparable<BigNumber>
// TODO Make necessary changes in Tests

// Singleton
private BigNumberUtils(){}

}
Loading

0 comments on commit 29dfaf9

Please sign in to comment.