Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 29th, 2020 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    public ArrayList<Integer> getRingElements() {
  2.         ArrayList<Integer> ringElements = new ArrayList<>();
  3.         if (ringSize == 1) {
  4.             ringElements.add(firstPos.position);
  5.             return ringElements;
  6.         }
  7.         Node currentNode = firstPos;
  8.         do {
  9.             ringElements.add(currentNode.position);
  10.             currentNode = currentNode.nextNode;
  11.         } while (currentNode.nextNode != lastPos.nextNode);
  12.         ringElements.add(currentNode.position);
  13.         return ringElements;
  14.     }
  15.  
  16.     public ArrayList<Integer> getRingElements() {
  17.         ArrayList<Integer> ringElements = new ArrayList<>();
  18.         if (ringSize == 1) {
  19.             ringElements.add(firstPos.position);
  20.         }else {
  21.             Node currentNode = firstPos;
  22.             do {
  23.                 ringElements.add(currentNode.position);
  24.                 currentNode = currentNode.nextNode;
  25.             } while (currentNode.nextNode != lastPos.nextNode);
  26.             ringElements.add(currentNode.position);
  27.         }
  28.         return ringElements;
  29.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top