1 55 package org.jboss.axis.types; 56 57 import java.util.StringTokenizer ; 58 59 65 public class IDRefs extends NCName 66 { 67 private IDRef[] idrefs; 68 69 public IDRefs() 70 { 71 super(); 72 } 73 74 79 public IDRefs(String stValue) throws IllegalArgumentException 80 { 81 setValue(stValue); 82 } 83 84 public void setValue(String stValue) 85 { 86 StringTokenizer tokenizer = new StringTokenizer (stValue); 87 int count = tokenizer.countTokens(); 88 idrefs = new IDRef[count]; 89 for (int i = 0; i < count; i++) 90 { 91 idrefs[i] = new IDRef(tokenizer.nextToken()); 92 } 93 } 94 95 public String toString() 96 { 97 String val = ""; 98 for (int i = 0; i < idrefs.length; i++) 99 { 100 IDRef ref = idrefs[i]; 101 if (i > 0) val += " "; 102 val += ref.toString(); 103 } 104 return val; 105 } 106 107 public boolean equals(Object object) 108 { 109 return (toString().equals(object.toString())); 110 } 111 } 112 | Popular Tags |