| | |
| | | * |
| | | * Copyright 2009-2010 Sun Microsystems, Inc. |
| | | * Portions copyright 2011-2016 ForgeRock AS. |
| | | * Portions Copyright 2026 3A Systems, LLC. |
| | | */ |
| | | package org.forgerock.opendj.ldap; |
| | | |
| | |
| | | |
| | | public abstract boolean hasOption(String normalizedOption); |
| | | |
| | | public abstract boolean equals(Impl other); |
| | | /** |
| | | * Options are compared by value, so this method must be kept consistent |
| | | * with {@link #hashCode()}. |
| | | */ |
| | | @Override |
| | | public abstract boolean equals(Object other); |
| | | |
| | | public abstract String firstNormalizedOption(); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean equals(final Impl other) { |
| | | public boolean equals(final Object other) { |
| | | if (other instanceof MultiOptionImpl) { |
| | | final MultiOptionImpl tmp = (MultiOptionImpl) other; |
| | | return Arrays.equals(normalizedOptions, tmp.normalizedOptions); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean equals(final Impl other) { |
| | | return other.size() == 1 && other.hasOption(normalizedOption); |
| | | public boolean equals(final Object other) { |
| | | if (other instanceof Impl) { |
| | | final Impl tmp = (Impl) other; |
| | | return tmp.size() == 1 && tmp.hasOption(normalizedOption); |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean equals(final Impl other) { |
| | | public boolean equals(final Object other) { |
| | | return this == other; |
| | | } |
| | | |