* @param slice the slice of attributes.
* @param source the source modifier.
* @return The modifier with the sliced attributes or null if none of the attributes matched.
*/
DmcTypeModifierMV getModifierSlice(DmcSliceInfo slice, DmcTypeModifierMV source){
DmcTypeModifierMV rc = new DmcTypeModifierMV();
Iterator<Modifier> mods = source.getMV();
while(mods.hasNext()){
Modifier mod = mods.next();
if (slice.contains(mod.getAttributeID())){
try {
rc.add(mod);
} catch (DmcValueException e) {
throw(new IllegalStateException("Should not throw an exception adding a Modifier to a DmcTypeModifier"));
}
}
}
if (rc.getMVSize() == 0)
rc = null;
return(rc);
}