package org.oic.simulator;
+import java.util.HashSet;
+import java.util.Set;
+
class ArrayValueValidator implements
AttributeValueVisitor.VisitingMethods<Boolean> {
return false;
}
+ Set<Integer> uniqueSet = new HashSet<Integer>();
for (Integer value : values) {
+ if (mProperty.isUnique() && uniqueSet.add(value) == false) {
+ return false;
+ }
+
if (false == elementProperty.asInteger().validate(value))
return false;
}
return false;
}
+ Set<Double> uniqueSet = new HashSet<Double>();
for (Double value : values) {
+ if (mProperty.isUnique() && uniqueSet.add(value) == false) {
+ return false;
+ }
+
if (false == elementProperty.asDouble().validate(value))
return false;
}
return false;
}
+ Set<Boolean> uniqueSet = new HashSet<Boolean>();
for (Boolean value : values) {
+ if (mProperty.isUnique() && uniqueSet.add(value) == false) {
+ return false;
+ }
+
if (false == elementProperty.asBoolean().validate(value))
return false;
}
return false;
}
+ Set<String> uniqueSet = new HashSet<String>();
for (String value : values) {
+ if (mProperty.isUnique() && uniqueSet.add(value) == false) {
+ return false;
+ }
+
if (false == elementProperty.asString().validate(value))
return false;
}
* This exception will be thrown if the interface type is
* invalid.
* @throws NoSupportException
- * This exception will be thrown if the interface type is
- * not supported by the resource.
+ * This exception will be thrown if the interface type is not
+ * supported by the resource.
* @throws SimulatorException
* This exception will be thrown if the native resource object
* does not exist or for some general errors.