/** * Checks if key is valid * @return Index to array of allowed keys or -1 which means error. */ final static int isValid(String key) { int index = -1; int i; String[] strArray = getAttrTypes(); String trimmedKey = key.trim(); for (i = 0; i < strArray.length; i++) { if (trimmedKey.equalsIgnoreCase(strArray[i]) == true) { index = i; break; } } return index; }
/** * Checks if key is valid * @return Index to array of allowed keys or -1 which means error. */ final static int isValid(String key) { int index = -1,i; String strArray[] = getAttrTypes(); String trimmedKey = key.trim(); for (i = 0; i < strArray.length;i++) { if (trimmedKey.equalsIgnoreCase(strArray[i]) == true) { index = i; break; } } return index; } }
/** * Checks if key is valid * @return Index to array of allowed keys or -1 which means error. */ final static int isValid(String key) { int index = -1,i; String strArray[] = getAttrTypes(); String trimmedKey = key.trim(); for (i = 0; i < strArray.length;i++) { if (trimmedKey.equalsIgnoreCase(strArray[i]) == true) { index = i; break; } } return index; } }
/** * Checks if key is valid * @return Index to array of allowed keys or -1 which means error. */ final int isValid() { String keyArray[] = getAttrTypes(); if (obj != null) return isValid("SERIALVALUE");//back compatibility // NOI18N if (keyIndex >= keyArray.length || keyIndex < 0) return -1; return keyIndex; }
final String getKeyForPrint() { if (obj != null && obj instanceof ModifiedAttribute) { Attr modifAttr = (Attr)((ModifiedAttribute)obj).getValue (); int keyIdx = Attr.isValid ("SERIALVALUE");//NOI18N if (modifAttr != null) keyIdx = distinguishObject (modifAttr.getValue ()); String keyArray[] = getAttrTypes(); return keyArray[keyIdx]; } return getKey (); }
/** * @return key. Key expresses type of this attribute (in textual form) or "" if internal error. */ final String getKey() { String keyArray[] = getAttrTypes(); if (obj != null) return "serialvalue";//back compatibility // NOI18N if (isValid() == -1) return ""; // NOI18N return keyArray[keyIndex]; }
/** * @return key. Key expresses type of this attribute (in textual form) or "" if internal error. */ final String getKey() { String keyArray[] = getAttrTypes(); if (obj != null) return "serialvalue";//back compatibility // NOI18N if (isValid() == -1) return ""; // NOI18N return keyArray[keyIndex]; }
/** * Checks if key is valid * @return Index to array of allowed keys or -1 which means error. */ final int isValid() { String keyArray[] = getAttrTypes(); if (obj != null) return isValid("SERIALVALUE");//back compatibility // NOI18N if (keyIndex >= keyArray.length || keyIndex < 0) return -1; return keyIndex; }
final String getKeyForPrint() { if (obj != null && obj instanceof ModifiedAttribute) { Attr modifAttr = (Attr)((ModifiedAttribute)obj).getValue (); int keyIdx = Attr.isValid ("SERIALVALUE");//NOI18N if (modifAttr != null) keyIdx = distinguishObject (modifAttr.getValue ()); String keyArray[] = getAttrTypes(); return keyArray[keyIdx]; } return getKey (); }
/** * @return key. Key expresses type of this attribute (in textual form) or "" if internal error. */ final String getKey() { String[] keyArray = getAttrTypes(); if (obj != null) { return "serialvalue"; //back compatibility // NOI18N } if (isValid() == -1) { return ""; // NOI18N } return keyArray[keyIndex]; }
/** * Checks if key is valid * @return Index to array of allowed keys or -1 which means error. */ final int isValid() { String[] keyArray = getAttrTypes(); if (obj != null) { return isValid("SERIALVALUE"); //back compatibility // NOI18N } if ((keyIndex >= keyArray.length) || (keyIndex < 0)) { return -1; } return keyIndex; }
@Override protected String[] getAllowedAttrs() { return XMLMapAttr.Attr.getAttrTypes(); } //ALLOWED_ATTR_KEYS
final String getKeyForPrint() { if ((obj != null) && obj instanceof ModifiedAttribute) { Attr modifAttr = (Attr) ((ModifiedAttribute) obj).getValue(); int keyIdx = Attr.isValid("SERIALVALUE"); //NOI18N if (modifAttr != null) { keyIdx = distinguishObject(modifAttr.getValue()); } String[] keyArray = getAttrTypes(); return keyArray[keyIdx]; } return getKey(); }