Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FUCoin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DistributedSystems4Students
FUCoin
Commits
6041bba0
Commit
6041bba0
authored
8 years ago
by
Simon Könnecke
Browse files
Options
Downloads
Patches
Plain Diff
add transactionHistory
parent
3a406e06
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fucoin/Statistics.java
+12
-0
12 additions, 0 deletions
src/main/java/fucoin/Statistics.java
with
12 additions
and
0 deletions
src/main/java/fucoin/Statistics.java
+
12
−
0
View file @
6041bba0
package
fucoin
;
package
fucoin
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.LinkedList
;
import
java.util.List
;
public
class
Statistics
implements
Serializable
{
public
class
Statistics
implements
Serializable
{
/**
/**
...
@@ -12,6 +14,8 @@ public class Statistics implements Serializable {
...
@@ -12,6 +14,8 @@ public class Statistics implements Serializable {
*/
*/
private
transient
QDigest
qDigest
=
new
QDigest
(
sCompression
);
private
transient
QDigest
qDigest
=
new
QDigest
(
sCompression
);
private
List
<
Integer
>
transactionHistory
=
new
LinkedList
<>();
public
QDigest
getqDigest
()
{
public
QDigest
getqDigest
()
{
return
qDigest
;
return
qDigest
;
}
}
...
@@ -19,4 +23,12 @@ public class Statistics implements Serializable {
...
@@ -19,4 +23,12 @@ public class Statistics implements Serializable {
public
void
setqDigest
(
QDigest
qDigest
)
{
public
void
setqDigest
(
QDigest
qDigest
)
{
this
.
qDigest
=
qDigest
;
this
.
qDigest
=
qDigest
;
}
}
public
void
addTransaction
(
int
amount
)
{
transactionHistory
.
add
(
amount
);
}
public
List
<
Integer
>
getTransactionHistory
()
{
return
transactionHistory
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment