001/* 002 * GeoAPI - Java interfaces for OGC/ISO standards 003 * Copyright © 2004-2023 Open Geospatial Consortium, Inc. 004 * http://www.geoapi.org 005 * 006 * Licensed under the Apache License, Version 2.0 (the "License"); 007 * you may not use this file except in compliance with the License. 008 * You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.opengis.geometry; 019 020 021/** 022 * Indicates that an operation cannot be completed properly because 023 * of a mismatch in the dimensions of an argument given to a method. 024 * For example, this exception may be thrown if a method expects a two-dimensional {@link DirectPosition} 025 * but the {@linkplain DirectPosition#getDimension() dimension} of a given position is 3. 026 * 027 * @author Martin Desruisseaux (IRD) 028 * @version 3.1 029 * @since 1.0 030 * 031 * @deprecated Moved to the {@link org.opengis.coordinate} package. 032 */ 033@Deprecated(since = "3.1") 034public class MismatchedDimensionException extends org.opengis.coordinate.MismatchedDimensionException { 035 /** 036 * Serial number for inter-operability with different versions. 037 */ 038 private static final long serialVersionUID = 3138484331425225155L; 039 040 /** 041 * Creates an exception with no message. 042 */ 043 public MismatchedDimensionException() { 044 super(); 045 } 046 047 /** 048 * Creates an exception with the specified message. 049 * 050 * @param message the detail message, saved for later retrieval by the {@link #getMessage()} method. 051 */ 052 public MismatchedDimensionException(final String message) { 053 super(message); 054 } 055 056 /** 057 * Creates an exception with the specified message and cause. 058 * 059 * @param message the detail message, saved for later retrieval by the {@link #getMessage()} method. 060 * @param cause the cause, saved for later retrieval by the {@link #getCause()} method. 061 */ 062 public MismatchedDimensionException(final String message, final Throwable cause) { 063 super(message, cause); 064 } 065}