/** * Ensures that serialization returns the unique instances. * * @return The object. * * @throws ObjectStreamException if there is a problem. */ private Object readResolve() throws ObjectStreamException { HorizontalAlignment result = null; if (this.equals(HorizontalAlignment.LEFT)) { result = HorizontalAlignment.LEFT; } else if (this.equals(HorizontalAlignment.RIGHT)) { result = HorizontalAlignment.RIGHT; } else if (this.equals(HorizontalAlignment.CENTER)) { result = HorizontalAlignment.CENTER; } return result; }
/** * Ensures that serialization returns the unique instances. * * @return The object. * * @throws ObjectStreamException if there is a problem. */ private Object readResolve() throws ObjectStreamException { HorizontalAlignment result = null; if (this.equals(HorizontalAlignment.LEFT)) { result = HorizontalAlignment.LEFT; } else if (this.equals(HorizontalAlignment.RIGHT)) { result = HorizontalAlignment.RIGHT; } else if (this.equals(HorizontalAlignment.CENTER)) { result = HorizontalAlignment.CENTER; } return result; }
/** * Ensures that serialization returns the unique instances. * * @return The object. * * @throws ObjectStreamException if there is a problem. */ private Object readResolve() throws ObjectStreamException { HorizontalAlignment result = null; if (this.equals(HorizontalAlignment.LEFT)) { result = HorizontalAlignment.LEFT; } else if (this.equals(HorizontalAlignment.RIGHT)) { result = HorizontalAlignment.RIGHT; } else if (this.equals(HorizontalAlignment.CENTER)) { result = HorizontalAlignment.CENTER; } return result; }