src/java.base/share/classes/java/text/AttributedString.java
changeset 57895 82a71d82e326
parent 53018 8bf9268df0e2
child 58242 94bb65cb37d3
equal deleted inserted replaced
57894:01b9c26e2651 57895:82a71d82e326
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
  1098     public boolean equals(Object o) {
  1098     public boolean equals(Object o) {
  1099         if (!(o instanceof AttributeEntry)) {
  1099         if (!(o instanceof AttributeEntry)) {
  1100             return false;
  1100             return false;
  1101         }
  1101         }
  1102         AttributeEntry other = (AttributeEntry) o;
  1102         AttributeEntry other = (AttributeEntry) o;
  1103         return other.key.equals(key) &&
  1103         return other.key.equals(key) && Objects.equals(other.value, value);
  1104             (value == null ? other.value == null : other.value.equals(value));
       
  1105     }
  1104     }
  1106 
  1105 
  1107     public Attribute getKey() {
  1106     public Attribute getKey() {
  1108         return key;
  1107         return key;
  1109     }
  1108     }