/** * Returns a metadata attribute wich is the representation of the index with the given name. This method delegates to * getPropertyValue(String). * * @param name the flag name * @return a metadata attribute wich is the representation of the flag with the given name */ public MetadataAttribute getIndex(String name) { return getAttribute(name); }
/** * Returns the flag mask value for the specified flag name. * * @param name the flag name * @return flagMask the flag's bit mask as a 32 bit integer * @throws IllegalArgumentException if <code>name</code> is null, or a flag with the name does not exist */ public int getIndexValue(String name) { Guardian.assertNotNull("name", name); MetadataAttribute attribute = getAttribute(name); if (attribute == null) { throw new IllegalArgumentException("index '" + name + "' not found"); } Debug.assertTrue(attribute.getData().isInt()); Debug.assertTrue(attribute.getData().isScalar()); return attribute.getData().getElemInt(); }