/** * Constructor for a numeric or string attribute, where metadata is supplied. Provides an alternative * way for creating string attributes. * * @param attributeName the name for the attribute * @param createStringAttribute if true, a string attribute will be created, otherwise a numeric one. * @param metadata the attribute's properties */ // @ requires attributeName != null; // @ requires metadata != null; // @ ensures m_Name == attributeName; public Attribute(String attributeName, boolean createStringAttribute, ProtectedProperties metadata) { m_Name = attributeName; if (createStringAttribute) { m_AttributeInfo = new NominalAttributeInfo((List<String>)null, attributeName); m_Type = STRING; } if (metadata != null) { m_AttributeMetaInfo = new AttributeMetaInfo(metadata, this); } }
/** * Constructor for a numeric or string attribute, where metadata is supplied. Provides an alternative * way for creating string attributes. * * @param attributeName the name for the attribute * @param createStringAttribute if true, a string attribute will be created, otherwise a numeric one. * @param metadata the attribute's properties */ // @ requires attributeName != null; // @ requires metadata != null; // @ ensures m_Name == attributeName; public Attribute(String attributeName, boolean createStringAttribute, ProtectedProperties metadata) { m_Name = attributeName; if (createStringAttribute) { m_AttributeInfo = new NominalAttributeInfo((List<String>)null, attributeName); m_Type = STRING; } if (metadata != null) { m_AttributeMetaInfo = new AttributeMetaInfo(metadata, this); } }
m_AttributeInfo = new NominalAttributeInfo(attributeValues, attributeName); if (attributeValues == null) { m_Type = STRING;
m_AttributeInfo = new NominalAttributeInfo(attributeValues, attributeName); if (attributeValues == null) { m_Type = STRING;