001/* 002 * Copyright (c) 2000 World Wide Web Consortium, 003 * (Massachusetts Institute of Technology, Institut National de 004 * Recherche en Informatique et en Automatique, Keio University). All 005 * Rights Reserved. This program is distributed under the W3C's Software 006 * Intellectual Property License. This program is distributed in the 007 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even 008 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 009 * PURPOSE. 010 * See W3C License http://www.w3.org/Consortium/Legal/ for more details. 011 * 012 * $Id: ConditionalSelectorImpl.java,v 1.1.1.1 2006/04/23 14:51:53 taqua Exp $ 013 */ 014package org.w3c.flute.parser.selectors; 015 016import org.w3c.css.sac.ConditionalSelector; 017import org.w3c.css.sac.Selector; 018import org.w3c.css.sac.SimpleSelector; 019import org.w3c.css.sac.Condition; 020 021/** 022 * @version $Revision: 1.1.1.1 $ 023 * @author Philippe Le Hegaret 024 */ 025public class ConditionalSelectorImpl implements ConditionalSelector { 026 027 SimpleSelector simpleSelector; 028 Condition condition; 029 030 /** 031 * An integer indicating the type of <code>Selector</code> 032 */ 033 public short getSelectorType() { 034 return Selector.SAC_CONDITIONAL_SELECTOR; 035 } 036 037 038 /** 039 * Creates a new ConditionalSelectorImpl 040 */ 041 public ConditionalSelectorImpl(SimpleSelector simpleSelector, 042 Condition condition) { 043 this.simpleSelector = simpleSelector; 044 this.condition = condition; 045 } 046 047 048 /** 049 * Returns the simple selector. 050 * <p>The simple selector can't be a <code>ConditionalSelector</code>.</p> 051 */ 052 public SimpleSelector getSimpleSelector() { 053 return simpleSelector; 054 } 055 056 /** 057 * Returns the condition to be applied on the simple selector. 058 */ 059 public Condition getCondition() { 060 return condition; 061 } 062} 063