1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-28 01:25:19 +00:00

Format code.

This commit is contained in:
2017-08-04 13:20:57 -07:00
parent b036b6c242
commit 39b36f84e0
14 changed files with 317 additions and 286 deletions

View File

@@ -26,10 +26,11 @@ public abstract class NumberImplementation {
/**
* Creates a new number implementation with the given data.
*
* @param implementation the implementation class.
* @param priority the priority, higher -> more likely to be converted into.
* @param priority the priority, higher -> more likely to be converted into.
*/
public NumberImplementation(Class<? extends NumberInterface> implementation, int priority){
public NumberImplementation(Class<? extends NumberInterface> implementation, int priority) {
this.implementation = implementation;
this.priority = priority;
promotionPaths = new HashMap<>();
@@ -37,30 +38,34 @@ public abstract class NumberImplementation {
/**
* Gets the list of all promotion paths this implementation can take.
*
* @return the map of documentation paths.
*/
public final Map<Class<? extends NumberInterface>, Function<NumberInterface, NumberInterface>> getPromotionPaths(){
public final Map<Class<? extends NumberInterface>, Function<NumberInterface, NumberInterface>> getPromotionPaths() {
return promotionPaths;
}
/**
* Gets the implementation class used by this implementation.
*
* @return the implementation class.
*/
public final Class<? extends NumberInterface> getImplementation(){
public final Class<? extends NumberInterface> getImplementation() {
return implementation;
}
/**
* Gets the priority of this number implementation.
*
* @return the priority.
*/
public final int getPriority(){
public final int getPriority() {
return priority;
}
/**
* Abstract function to create a new instance from a string.
*
* @param string the string to create a number from.
* @return the resulting number.
*/
@@ -68,6 +73,7 @@ public abstract class NumberImplementation {
/**
* Get the instance of pi with the given implementation.
*
* @return pi
*/
public abstract NumberInterface instanceForPi();