DGroupPattern.java revision 325
2N/A/*
2N/A * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
2N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2N/A *
2N/A * This code is free software; you can redistribute it and/or modify it
2N/A * under the terms of the GNU General Public License version 2 only, as
2N/A * published by the Free Software Foundation. Oracle designates this
2N/A * particular file as subject to the "Classpath" exception as provided
2N/A * by Oracle in the LICENSE file that accompanied this code.
2N/A *
2N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2N/A * version 2 for more details (a copy is included in the LICENSE file that
2N/A * accompanied this code).
2N/A *
2N/A * You should have received a copy of the GNU General Public License version
2N/A * 2 along with this work; if not, write to the Free Software Foundation,
2N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2N/A *
2N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2N/A * or visit www.oracle.com if you need additional information or have any
2N/A * questions.
2N/A */
2N/A/*
2N/A * Copyright (C) 2004-2011
2N/A *
2N/A * Permission is hereby granted, free of charge, to any person obtaining a copy
2N/A * of this software and associated documentation files (the "Software"), to deal
2N/A * in the Software without restriction, including without limitation the rights
2N/A * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2N/A * copies of the Software, and to permit persons to whom the Software is
2N/A * furnished to do so, subject to the following conditions:
2N/A *
2N/A * The above copyright notice and this permission notice shall be included in
2N/A * all copies or substantial portions of the Software.
2N/A *
2N/A * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2N/A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2N/A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2N/A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2N/A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2N/A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2N/A * THE SOFTWARE.
2N/A */
2N/Apackage com.sun.xml.internal.rngom.digested;
2N/A
2N/A/**
2N/A * @author Kohsuke Kawaguchi (kk@kohsuke.org)
2N/A */
2N/Apublic class DGroupPattern extends DContainerPattern {
2N/A public boolean isNullable() {
2N/A for( DPattern p=firstChild(); p!=null; p=p.next )
2N/A if(!p.isNullable())
2N/A return false;
2N/A return true;
2N/A }
2N/A public <V> V accept( DPatternVisitor<V> visitor ) {
2N/A return visitor.onGroup(this);
2N/A }
2N/A}
2N/A