From 1c5e38fe69ac8a6decbdd8abe93112f4e3369315 Mon Sep 17 00:00:00 2001 From: Joshua Rahm Date: Fri, 30 Jan 2015 17:11:48 -0700 Subject: added source --- src/AppendingThread.java | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/AppendingThread.java (limited to 'src/AppendingThread.java') diff --git a/src/AppendingThread.java b/src/AppendingThread.java new file mode 100644 index 0000000..90fd434 --- /dev/null +++ b/src/AppendingThread.java @@ -0,0 +1,38 @@ +/* */ import java.io.PrintStream; +/* */ import java.util.ArrayList; +/* */ import utilities.DecimalFormatter; +/* */ +/* */ public class AppendingThread extends Thread +/* */ { +/* 12 */ private static int count = 1; +/* */ private int index; +/* */ private String str; +/* */ private ArrayList ans; +/* */ private DecimalFormatter f; +/* */ +/* */ public AppendingThread(String toSolve, int index, ArrayList ans, DecimalFormatter f) +/* */ { +/* 18 */ super(Thread.currentThread().getThreadGroup(), "AppendingThread - " + count); +/* 19 */ count += 1; +/* 20 */ this.str = toSolve; +/* 21 */ this.ans = ans; +/* 22 */ this.index = index; +/* 23 */ this.f = f; +/* */ } +/* */ public void run() { +/* 26 */ String temp = ""; +/* */ try { +/* 28 */ temp = ControlPanel.figure(this.str); +/* */ } catch (Exception e) { +/* 30 */ System.out.println(e.getMessage()); +/* 31 */ }CalculatorGUI.silentPrint(this.str + "->"); +/* 32 */ System.out.println(this.f.format(temp)); +/* 33 */ CalculatorGUI.silentPrint("\n"); +/* 34 */ this.ans.add(this.index + 1, this.f.format(temp)); +/* */ } +/* */ } + +/* Location: Modulus.jar + * Qualified Name: AppendingThread + * JD-Core Version: 0.6.2 + */ \ No newline at end of file -- cgit