Debian Codegraph @

java/org/zoy/caca/CacaObject.java

raw
1 /**
2 * libcaca Java bindings for libcaca
3 * Copyright (c) 2009 Adrien Grand <[email protected]>
4 *
5 * This library is free software. It comes without any warranty, to
6 * the extent permitted by applicable law. You can redistribute it
7 * and/or modify it under the terms of the Do What the Fuck You Want
8 * to Public License, Version 2, as published by Sam Hocevar. See
9 * http://www.wtfpl.net/ for more details.
10 */
11
12 package org.zoy.caca;
13
14 public abstract class CacaObject {
15
16 protected String code;
17 protected String description;
18 public CacaObject(String code, String desc) {
19 this.code = code;
20 this.description = desc;
21 }
22 public String getCode() {
23 return code;
24 }
25 public String getDescription() {
26 return description;
27 }
28 @Override
29 public boolean equals(Object o) {
30 if (o == null) return false;
31 if (this.getClass().equals(o.getClass())) {
32 CacaObject other = (CacaObject)o;
33 return this.code.equals(other.code);
34 }
35 return false;
36 }
37
38 }