From 64fe5e4adbeaf594af55fecb7728c1ef4ab6ff20 Mon Sep 17 00:00:00 2001 From: Rui Hu Date: Tue, 12 Mar 2024 15:23:43 +0800 Subject: [PATCH] Rename Padlock to PadlockImpl --- .../interview/padlock/{Padlock.java => PadlockImpl.java} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename padlock-impl/src/main/java/com/cleverthis/interview/padlock/{Padlock.java => PadlockImpl.java} (97%) diff --git a/padlock-impl/src/main/java/com/cleverthis/interview/padlock/Padlock.java b/padlock-impl/src/main/java/com/cleverthis/interview/padlock/PadlockImpl.java similarity index 97% rename from padlock-impl/src/main/java/com/cleverthis/interview/padlock/Padlock.java rename to padlock-impl/src/main/java/com/cleverthis/interview/padlock/PadlockImpl.java index fb8ebe6..0986289 100644 --- a/padlock-impl/src/main/java/com/cleverthis/interview/padlock/Padlock.java +++ b/padlock-impl/src/main/java/com/cleverthis/interview/padlock/PadlockImpl.java @@ -1,6 +1,5 @@ package com.cleverthis.interview.padlock; -import java.security.InvalidParameterException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -27,7 +26,7 @@ import static com.cleverthis.interview.padlock.Utils.ensureSleep; *
* After create, the input buffer is empty, you have to initialize. */ -public class Padlock { +public class PadlockImpl { private final int numpadSize; private final Integer[] inputBuffer; private final Integer[] correctPasscode; @@ -37,7 +36,7 @@ public class Padlock { * * @param numpadSize The number of buttons on the numpad of this lock. */ - public Padlock(int numpadSize) { + public PadlockImpl(int numpadSize) { if (numpadSize < 1) throw new IllegalArgumentException("numpadSize must be a positive number"); this.numpadSize = numpadSize; this.inputBuffer = new Integer[numpadSize];