AdapterDetector.java

  1. /* Copyright 2002-2025 CS GROUP
  2.  * Licensed to CS GROUP (CS) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * CS licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.orekit.propagation.events;

  18. /** Base class for adapting an existing detector.
  19.  * <p>
  20.  * This class is intended to be a base class for changing behaviour
  21.  * of a wrapped existing detector. This base class delegates all
  22.  * its methods to the wrapped detector. Classes extending it can
  23.  * therefore override only the methods they want to change.
  24.  * </p>
  25.  * @author Luc Maisonobe
  26.  * @since 9.3
  27.  * @deprecated since 13.0. Use {@link DetectorModifier} instead.
  28.  */
  29. @Deprecated
  30. public class AdapterDetector implements DetectorModifier {

  31.     /** Wrapped detector. */
  32.     private final EventDetector detector;

  33.     /** Build an adaptor wrapping an existing detector.
  34.      * @param detector detector to wrap
  35.      */
  36.     public AdapterDetector(final EventDetector detector) {
  37.         this.detector = detector;
  38.     }

  39.     /** Get the wrapped detector.
  40.      * @return wrapped detector
  41.      */
  42.     public EventDetector getDetector() {
  43.         return detector;
  44.     }
  45. }