All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sun.xml.xsom.util.SimpleTypeSet Maven / Gradle / Ivy

There is a newer version: 4.0.5
Show newest version
/*
 * Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Distribution License v. 1.0, which is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

package com.sun.xml.xsom.util;

import java.util.Set;

import com.sun.xml.xsom.XSType;

/**
 * A very simple TypeSet.
 * 
 * The contains method returns true if the set explicitly contains an
 * instance of the specified XSType.
 * 
 * @author Ryan Shoemaker, Sun Microsystems, Inc.
 */
public class SimpleTypeSet extends TypeSet {

    private final Set typeSet;
    
    public SimpleTypeSet(Set s) {
        typeSet = s;
    }
    
    /* (non-Javadoc)
     * @see com.sun.xml.xsom.util.TypeSet#contains(com.sun.xml.xsom.XSDeclaration)
     */
    public boolean contains(XSType type) {
        return typeSet.contains(type);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy