equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2018, 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 |
602 * @since 1.6 |
602 * @since 1.6 |
603 */ |
603 */ |
604 public static class SimpleEntry<K,V> |
604 public static class SimpleEntry<K,V> |
605 implements Entry<K,V>, java.io.Serializable |
605 implements Entry<K,V>, java.io.Serializable |
606 { |
606 { |
|
607 @java.io.Serial |
607 private static final long serialVersionUID = -8499721149061103585L; |
608 private static final long serialVersionUID = -8499721149061103585L; |
608 |
609 |
|
610 @SuppressWarnings("serial") // Conditionally serializable |
609 private final K key; |
611 private final K key; |
|
612 @SuppressWarnings("serial") // Conditionally serializable |
610 private V value; |
613 private V value; |
611 |
614 |
612 /** |
615 /** |
613 * Creates an entry representing a mapping from the specified |
616 * Creates an entry representing a mapping from the specified |
614 * key to the specified value. |
617 * key to the specified value. |
732 * @since 1.6 |
735 * @since 1.6 |
733 */ |
736 */ |
734 public static class SimpleImmutableEntry<K,V> |
737 public static class SimpleImmutableEntry<K,V> |
735 implements Entry<K,V>, java.io.Serializable |
738 implements Entry<K,V>, java.io.Serializable |
736 { |
739 { |
|
740 @java.io.Serial |
737 private static final long serialVersionUID = 7138329143949025153L; |
741 private static final long serialVersionUID = 7138329143949025153L; |
738 |
742 |
|
743 @SuppressWarnings("serial") // Not statically typed as Serializable |
739 private final K key; |
744 private final K key; |
|
745 @SuppressWarnings("serial") // Not statically typed as Serializable |
740 private final V value; |
746 private final V value; |
741 |
747 |
742 /** |
748 /** |
743 * Creates an entry representing a mapping from the specified |
749 * Creates an entry representing a mapping from the specified |
744 * key to the specified value. |
750 * key to the specified value. |