Check if there is a valid integer attribute.
@param attributeName the attribute name
@return true if the attribute is a valid int
185871
public boolean hasFloat(String attributeName) {
        String attr = attributes.get(attributeName);
        if (attr == null || attr.isEmpty()) {
            return false;
        }
        try {
            Float.parseFloat(attr);
            return true;
        } catch (NumberFormatException ex) {
            return false;
        }
    }
362886
private boolean attributeValuesMatch(Set attributes, int runIndex1, int runIndex2) {
        Iterator iterator = attributes.iterator();
        while (iterator.hasNext()) {
            Attribute key = (Attribute) iterator.next();
           if (!valuesMatch(getAttribute(key, runIndex1), getAttribute(key, runIndex2))) {
                return false;
            }
        }
        return true;
    }
720103
public boolean isNumber() {
        return ( this.simpleType == SimpleValueType.INTEGER ||
                 this.simpleType == SimpleValueType.DECIMAL ||
                 this.simpleType == SimpleValueType.CHAR || 
                 this.simpleType == SimpleValueType.NUMBER ) ;
    }
1219301
public int getValue(String attributeName, int defaultValue) {
        A attribute = getAt(attributeName);
        Object attributeValue = (attribute == null) ? null : attribute.getValue();
        return (attributeValue == null) ? defaultValue : Integer.parseInt(attributeValue.toString());
    }
837960
protected function validateInteger( $attribute, $value )
	{
		if ( !$this->hasAttribute( $attribute ) )
		{
			return true;
		}

		return is_null( $value ) || filter_var( $value, FILTER_VALIDATE_INT ) !== false;
	}
357747
public boolean isDeclared (String qName)
    {
    int index = getIndex (qName);

    if (index < 0)
        throw new IllegalArgumentException (
        "No such attribute: " + qName);
    return declared [index];
    }
913651
public static boolean isValidFieldName(String fieldName) {
        return fieldName != null &&
               fieldName.length() > 0 &&
               Utils.isLetter(fieldName.charAt(0)) &&
               Utils.allAlphaNumUnderscore(fieldName);
    }
191010
public Object getAttributeValue(String attributeName) {
		Attribute attribute = getAllAttributes().get(attributeName);
		if (attribute != null) {
			return attribute.getValue();
		}
		return null;
	}
316263
public static int extractIndex(String attributeName) {

        int index = 0;
        // check if the value index is appended to the attribute name
        if (hasIndex(attributeName)) {
            try {
                String temp = attributeName.substring(attributeName.lastIndexOf("[") + 1, attributeName.length() - 1);

                index = Integer.parseInt(temp);
            } catch (NumberFormatException e) {
                // ignore
            }
        }
        return index;
    }
604657
private static boolean isStandardAttr(String attribute) {
        // For now, we just have two standard attributes:
        // KeySize and ImplementedIn.
        if (attribute.equalsIgnoreCase("KeySize"))
            return true;

        if (attribute.equalsIgnoreCase("ImplementedIn"))
            return true;

        return false;
    }
916832
public Item withNumber(String attrName, Number val) {
        checkInvalidAttribute(attrName, val);
        attributes.put(attrName, toBigDecimal(val));
        return this;
    }
1075417
public int getInt(String attribute, String namespace) {
        return Integer.parseInt(get(attribute, namespace));
    }
177338
@Override
    public boolean contains(AttributeKey<?> key) {

        if (this.internals.containsKey(key.name())) {
            return true;
        }

        return this.attributes.contains(key);

    }
97802
def hasAttribute(self, attrName):
        '''
            
        '''
        attrName = attrName.lower()

        # Check if requested attribute is present on this node
        return bool(attrName in self._attributes)
224380
def validate_attr_name(name):
    

    try:
        validate_sqlite_attr_name(name)
    except (InvalidCharError, InvalidReservedNameError) as e:
        raise NameValidationError(e)
    except NullNameError:
        raise NameValidationError("attribute name is empty")
146092
public Item withInt(String attrName, int val) {
        checkInvalidAttrName(attrName);
        return withNumber(attrName, Integer.valueOf(val));
    }
392503
public Item withNumber(String attrName, BigDecimal val) {
        checkInvalidAttribute(attrName, val);
        attributes.put(attrName, val);
        return this;
    }