1 13 14 package com.ibm.webdav; 15 16 import java.util.*; 17 18 22 23 public class SearchCondition { 24 25 protected Vector m_conditions = new Vector(); 26 protected String m_sOperator = "and"; 27 28 public SearchCondition() { 29 } 30 31 public void addCondition(SearchConditionTerm term) { 32 m_conditions.add(term); 33 } 34 35 public void addCondition(SearchCondition cond) { 36 m_conditions.add(cond); 37 } 38 39 public void setOperator(String sOp) { 40 m_sOperator = sOp; 41 } 42 43 public String getOperator() { 44 return m_sOperator; 45 } 46 47 public int size() { 48 return this.m_conditions.size(); 49 } 50 51 public Object getCondition(int index) { 52 return m_conditions.elementAt(index); 53 } 54 55 public boolean isConditionLeaf(Object obj) { 56 return (obj instanceof SearchConditionTerm); 57 } 58 59 public boolean isConditionLeaf(int index) { 60 return isConditionLeaf(this.m_conditions.elementAt(index)); 61 } 62 63 } | Popular Tags |