/** * Create a new OAV attribute type. * @param otype The object type holding the attribute. * @param name The name of the OAV attribute type. * @param mult The multiplicity. * @param type The type. * @param def The default value. */ protected OAVAttributeType(OAVObjectType otype, String name, OAVObjectType type, String mult, Object def, OAVAttributeType idxattr) { if(otype==null || type==null) throw new IllegalArgumentException("Type must not be null."); if(!MULTIPLICITIES_ALL.contains(mult)) throw new IllegalArgumentException("Type must be one of: "+MULTIPLICITIES_ALL+" "+mult); this.otype = otype; this.name = name; this.mult = mult; this.type = type; this.def = def; this.idxattr = idxattr; this.hashcode = calcHashCode(); }
/** * Create a new OAV attribute type. * @param otype The object type holding the attribute. * @param name The name of the OAV attribute type. * @param mult The multiplicity. * @param type The type. * @param def The default value. */ protected OAVAttributeType(OAVObjectType otype, String name, OAVObjectType type, String mult, Object def, OAVAttributeType idxattr) { if(otype==null || type==null) throw new IllegalArgumentException("Type must not be null."); if(!MULTIPLICITIES_ALL.contains(mult)) throw new IllegalArgumentException("Type must be one of: "+MULTIPLICITIES_ALL+" "+mult); this.otype = otype; this.name = name; this.mult = mult; this.type = type; this.def = def; this.idxattr = idxattr; this.hashcode = calcHashCode(); }