From f50fc10318578c4cea3792ad64141c078b910774 Mon Sep 17 00:00:00 2001 From: Zontreck Date: Mon, 12 Feb 2024 03:33:26 -0700 Subject: [PATCH] Add the tostring function for debugging purposes to arguments --- .../dev/zontreck/ariaslib/args/BooleanArgument.java | 10 +++++++++- .../dev/zontreck/ariaslib/args/IntegerArgument.java | 9 +++++++++ .../java/dev/zontreck/ariaslib/args/LongArgument.java | 9 +++++++++ .../dev/zontreck/ariaslib/args/StringArgument.java | 8 ++++++++ 4 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/main/java/dev/zontreck/ariaslib/args/BooleanArgument.java b/src/main/java/dev/zontreck/ariaslib/args/BooleanArgument.java index de29fdd..cad4620 100644 --- a/src/main/java/dev/zontreck/ariaslib/args/BooleanArgument.java +++ b/src/main/java/dev/zontreck/ariaslib/args/BooleanArgument.java @@ -12,7 +12,7 @@ public class BooleanArgument extends Argument { super(name); this.hasValue = true; - this.value = value; + this.value = true; } @Override @@ -24,4 +24,12 @@ public class BooleanArgument extends Argument { public ArgumentType getType() { return ArgumentType.BOOLEAN; } + + + @Override + public String toString() { + return "BooleanArgument{" + + name + "=true" + + '}'; + } } diff --git a/src/main/java/dev/zontreck/ariaslib/args/IntegerArgument.java b/src/main/java/dev/zontreck/ariaslib/args/IntegerArgument.java index bf8eb49..9c7430f 100644 --- a/src/main/java/dev/zontreck/ariaslib/args/IntegerArgument.java +++ b/src/main/java/dev/zontreck/ariaslib/args/IntegerArgument.java @@ -18,4 +18,13 @@ public class IntegerArgument extends Argument { public Integer getValue() { return value; } + + + @Override + public String toString() { + return "IntegerArgument{" + + name + "=" + + value + + '}'; + } } diff --git a/src/main/java/dev/zontreck/ariaslib/args/LongArgument.java b/src/main/java/dev/zontreck/ariaslib/args/LongArgument.java index c8a4c03..2541d59 100644 --- a/src/main/java/dev/zontreck/ariaslib/args/LongArgument.java +++ b/src/main/java/dev/zontreck/ariaslib/args/LongArgument.java @@ -18,4 +18,13 @@ public class LongArgument extends Argument { public Long getValue() { return value; } + + + @Override + public String toString() { + return "LongArgument{" + + name + "=" + + value + + '}'; + } } diff --git a/src/main/java/dev/zontreck/ariaslib/args/StringArgument.java b/src/main/java/dev/zontreck/ariaslib/args/StringArgument.java index 3575486..8c17782 100644 --- a/src/main/java/dev/zontreck/ariaslib/args/StringArgument.java +++ b/src/main/java/dev/zontreck/ariaslib/args/StringArgument.java @@ -19,4 +19,12 @@ public class StringArgument extends Argument { public ArgumentType getType() { return ArgumentType.STRING; } + + @Override + public String toString() { + return "StringArgument{" + + name + "=" + + value + + '}'; + } }