-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed Integer Value and changed some tests
- Loading branch information
1 parent
6107ebd
commit f3aab4e
Showing
8 changed files
with
319 additions
and
367 deletions.
There are no files selected for viewing
120 changes: 60 additions & 60 deletions
120
.../main/java/com/regnosys/rosetta/interpreternew/values/RosettaInterpreterIntegerValue.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
package com.regnosys.rosetta.interpreternew.values; | ||
|
||
import java.math.BigInteger; | ||
import java.util.Objects; | ||
import java.util.stream.Stream; | ||
|
||
import com.regnosys.rosetta.rosetta.interpreter.RosettaInterpreterValue; | ||
|
||
public class RosettaInterpreterIntegerValue extends RosettaInterpreterBaseValue | ||
implements Comparable<RosettaInterpreterIntegerValue> { | ||
|
||
private BigInteger value; | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(value); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
RosettaInterpreterIntegerValue other = (RosettaInterpreterIntegerValue) obj; | ||
return Objects.equals(value, other.value); | ||
} | ||
|
||
public RosettaInterpreterIntegerValue(BigInteger value) { | ||
super(); | ||
this.value = value; | ||
} | ||
|
||
public RosettaInterpreterIntegerValue(int value) { | ||
super(); | ||
this.value = BigInteger.valueOf(value); | ||
} | ||
|
||
public BigInteger getValue() { return value; } | ||
|
||
@Override | ||
public int compareTo(RosettaInterpreterIntegerValue o) { | ||
return this.value.compareTo(o.value); | ||
} | ||
|
||
@Override | ||
public Stream<Object> toElementStream() { | ||
return Stream.of(value); | ||
} | ||
|
||
@Override | ||
public Stream<RosettaInterpreterValue> toValueStream() { | ||
return Stream.of(this); | ||
} | ||
} | ||
//package com.regnosys.rosetta.interpreternew.values; | ||
// | ||
//import java.math.BigInteger; | ||
//import java.util.Objects; | ||
//import java.util.stream.Stream; | ||
// | ||
//import com.regnosys.rosetta.rosetta.interpreter.RosettaInterpreterValue; | ||
// | ||
//public class RosettaInterpreterIntegerValue extends RosettaInterpreterBaseValue | ||
// implements Comparable<RosettaInterpreterIntegerValue> { | ||
// | ||
// private BigInteger value; | ||
// | ||
// @Override | ||
// public int hashCode() { | ||
// return Objects.hash(value); | ||
// } | ||
// | ||
// @Override | ||
// public boolean equals(Object obj) { | ||
// if (this == obj) { | ||
// return true; | ||
// } | ||
// if (obj == null) { | ||
// return false; | ||
// } | ||
// if (getClass() != obj.getClass()) { | ||
// return false; | ||
// } | ||
// RosettaInterpreterIntegerValue other = (RosettaInterpreterIntegerValue) obj; | ||
// return Objects.equals(value, other.value); | ||
// } | ||
// | ||
// public RosettaInterpreterIntegerValue(BigInteger value) { | ||
// super(); | ||
// this.value = value; | ||
// } | ||
// | ||
// public RosettaInterpreterIntegerValue(int value) { | ||
// super(); | ||
// this.value = BigInteger.valueOf(value); | ||
// } | ||
// | ||
// public BigInteger getValue() { return value; } | ||
// | ||
// @Override | ||
// public int compareTo(RosettaInterpreterIntegerValue o) { | ||
// return this.value.compareTo(o.value); | ||
// } | ||
// | ||
// @Override | ||
// public Stream<Object> toElementStream() { | ||
// return Stream.of(value); | ||
// } | ||
// | ||
// @Override | ||
// public Stream<RosettaInterpreterValue> toValueStream() { | ||
// return Stream.of(this); | ||
// } | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.