2015-05-24 14:13:07 +03:00
|
|
|
package com.iluwatar;
|
|
|
|
|
|
|
|
public class Oliphaunt {
|
2015-05-24 21:47:57 +03:00
|
|
|
|
|
|
|
private static int counter = 1;
|
|
|
|
|
|
|
|
private final int id;
|
|
|
|
|
|
|
|
public Oliphaunt() {
|
|
|
|
id = counter++;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return String.format("Oliphaunt id=%d", id);
|
|
|
|
}
|
2015-05-24 14:13:07 +03:00
|
|
|
}
|