From aac9e71b77c7081fc2689fa2bb55c932739f3776 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 9 Feb 2018 10:32:56 +0100 Subject: [PATCH] Include everything in the same class. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- Listes/Liste.java | 51 ++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/Listes/Liste.java b/Listes/Liste.java index 6dd1c5f..711b983 100644 --- a/Listes/Liste.java +++ b/Listes/Liste.java @@ -1,38 +1,39 @@ -class IntNode { - private int data; - private IntNode next; +public class Liste { - IntNode(int value) { - setData(value); - setNext(null); - } + private class IntNode { + private int data; + private IntNode next; - IntNode(int value, IntNode nextNode) { - setData(value); - setNext(nextNode); - } + IntNode(int value) { + setData(value); + setNext(null); + } - public int getData() { - return data; - } + IntNode(int value, IntNode nextNode) { + setData(value); + setNext(nextNode); + } - public void setData(int value) { - data = value; - } + private int getData() { + return data; + } - public IntNode getNext() { - return next; - } + private void setData(int value) { + data = value; + } - public void setNext(IntNode nextNode) { - next = nextNode; - } + private IntNode getNext() { + return next; + } -} + private void setNext(IntNode nextNode) { + next = nextNode; + } + + } -class Liste { private IntNode headNode; private int list_counter; -- 2.34.1