001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *     http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.commons.scxml2.model;
018
019/**
020 * The class in this SCXML object model that corresponds to the
021 * <final> SCXML element.
022 *
023 * @since 0.7
024 */
025public class Final extends EnterableState {
026
027    /**
028     * Serial version UID.
029     */
030    private static final long serialVersionUID = 1L;
031
032    /**
033     * Default no-args constructor.
034     */
035    public Final() {
036        super();
037    }
038
039    /**
040     * @return Returns the State parent
041     */
042    @Override
043    public State getParent() {
044        return (State)super.getParent();
045    }
046
047    /**
048     * Set the parent State.
049     * @param parent The parent state to set
050     */
051    public final void setParent(State parent) {
052        super.setParent(parent);
053    }
054
055    /**
056     * {@inheritDoc}
057     * @return Returns always true (a state of type Final is always atomic)
058     */
059    public final boolean isAtomicState() {
060        return true;
061    }
062}
063