Remove exported everywhere.
[SquirrelJME.git] / modules / tool-classfile / src / main / java / net / multiphasicapps / classfile / UTFConstantEntry.java
blob56929937a2e8914c7952eb47da88e76c59b1e6f9
1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the GNU General Public License v3+, or later.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package net.multiphasicapps.classfile;
12 /**
13 * This represents a UTF-8 constant pool entry.
15 * @since 2017/06/09
17 public final class UTFConstantEntry
19 /** The string representation. */
20 protected final String string;
22 /**
23 * Initializes the constant entry.
25 * @param __s The string used.
26 * @throws NullPointerException On null arguments.
27 * @since 2017/06/09
29 public UTFConstantEntry(String __s)
30 throws NullPointerException
32 // Check
33 if (__s == null)
34 throw new NullPointerException("NARG");
36 // Set
37 this.string = __s;
40 /**
41 * {@inheritDoc}
42 * @since 2017/06/09
44 @Override
45 public boolean equals(Object __o)
47 if (!(__o instanceof UTFConstantEntry))
48 return false;
50 return this.string.equals(((UTFConstantEntry)__o).string);
53 /**
54 * {@inheritDoc}
55 * @since 2017/06/09
57 @Override
58 public int hashCode()
60 return this.string.hashCode();
63 /**
64 * {@inheritDoc}
65 * @since 2017/06/09
67 @Override
68 public String toString()
70 return this.string;