/** * Returns the name of this principal, which is just the string representation of the ID. * * @return the name of this principal (not {@code null}) */ public String getName() { return Long.toUnsignedString(id); } }
static long values = Long.parseUnsignedLong("18446744073709551615"); public static void main(String[] args) { System.out.println(values); // -1 System.out.println(Long.toUnsignedString(values)); // 18446744073709551615 }
literal = Long.toUnsignedString(Long.parseLong(value));
/** * The message id this reaction is attached to * * @return The message id this reaction is attached to */ public String getMessageId() { return Long.toUnsignedString(messageId); }
/** * The message id * * @return The message id */ public String getMessageId() { return Long.toUnsignedString(messageId); }
/** * The id for this message * * @return The id for this message */ public String getMessageId() { return Long.toUnsignedString(messageId); }
/** * The ID of the guild * * @return The ID of the guild */ public String getGuildId() { return Long.toUnsignedString(guildId); }
/** * The snowflake id of the target Webhook * * @return id of the target Webhook */ public String getId() { return Long.toUnsignedString(id); }
/** * The id for this message * * @return The id for this message */ public String getMessageId() { return Long.toUnsignedString(messageId); }
@Override public String getMessageId() { return Long.toUnsignedString(messageId); }
static String rlimitToString(long value) { assert Constants.LINUX || Constants.MAC_OS_X; if (value == JNACLibrary.RLIM_INFINITY) { return "unlimited"; } else { return Long.toUnsignedString(value); } }
/** * The id for the target entity. * <br>This references an entity based on the {@link net.dv8tion.jda.core.audit.TargetType TargetType} * which is specified by {@link #getTargetType()}! * * @return The target id */ public String getTargetId() { return Long.toUnsignedString(targetId); }
@Override public String getAuthId() { return Long.toUnsignedString(this.authId); }
/** * The ID for the responsible application. * * @return The ID for the application */ @Nonnull public String getApplicationId() { return Long.toUnsignedString(applicationId); }
protected JSONObject newVoiceClose(long guildId) { return new JSONObject() .put("op", WebSocketCode.VOICE_STATE) .put("d", new JSONObject() .put("guild_id", Long.toUnsignedString(guildId)) .put("channel_id", JSONObject.NULL) .put("self_mute", false) .put("self_deaf", false)); }
protected WebhookClient(final long id, final String token, final OkHttpClient client, final ScheduledExecutorService pool) { this.client = client; this.id = id; this.url = String.format(WEBHOOK_URL, Long.toUnsignedString(id), token); this.pool = pool; this.bucket = new Bucket(); this.queue = new LinkedBlockingQueue<>(); this.isQueued = false; }
/** * The Snowflake id of this entity. This is unique to every entity and will never change. * * @return Never-null String containing the Id. */ default String getId() { return Long.toUnsignedString(getIdLong()); }
/** * The snowflake ID for the responsible {@link net.dv8tion.jda.core.entities.Category Category} * * @return The ID for the category */ public String getId() { return Long.toUnsignedString(getIdLong()); }
/** * The ID for the current owner of this guild. * <br>This is useful for debugging purposes or as a shortcut. * * @return The ID for the current owner * * @see #getOwner() */ default String getOwnerId() { return Long.toUnsignedString(getOwnerIdLong()); }
boolean verifyJwtForAppEngine(HttpRequest request, long projectNumber, String projectId) throws Exception { // Check for iap jwt header in incoming request String jwt = request.getHeaders().getFirstHeaderStringValue("x-goog-iap-jwt-assertion"); if (jwt == null) { return false; } return verifyJwt( jwt, String.format("/projects/%s/apps/%s", Long.toUnsignedString(projectNumber), projectId)); }