/** * Return a unique integer for the specified key. * <p> * The function always returns the same value for the same key as long as the app is * running. After an app restart (when the memory is cleared), a new value will be generated. * <p> * Currently the function is implemented with a sequential positive integer, so the first * contact will get the number 1, the second contact will get the number 2, and so on.
*/ privatestaticint getTempId(String key) { synchronized (contactIds) { if (!contactIds.containsKey(key)) {
contactIds.put(key, contactIds.size() + 1);
} return contactIds.get(key);
}
}
/** * Return a unique integer for the specified contact. * <p> * The function always returns the same value for the same contact as long as the app is * running. After an app restart (when the memory is cleared), a new value will be generated. * <p> * Currently the function is implemented with a sequential positive integer, so the first * contact will get the number 1, the second contact will get the number 2, and so on.
*/ publicstaticint getContactTempId(@NonNull String identity) { return getTempId(KEY_CONTACT + identity);
}
/** * Return a unique integer for the specified group. * <p> * The function always returns the same value for the same group as long as the app is * running. After an app restart (when the memory is cleared), a new value will be generated. * <p> * Currently the function is implemented with a sequential positive integer, so the first * contact will get the number 1, the second contact will get the number 2, and so on.
*/ publicstaticint getGroupTempId(GroupModelOld group) { return getTempId(KEY_GROUP + group.getId());
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-04-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.