public class

Longs

extends Object
java.lang.Object
   ↳ com.atlassian.jira.util.Longs

Class Overview

Contains static utility methods pertaining to the Long type.

Summary

Public Constructors
Longs()
Public Methods
@Nonnull static Optional<Long> toLong(String value)
Parses the string argument as a Long by delegating to parseLong(String), but returns an Optional instead of throwing a NumberFormatException.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Longs ()

Public Methods

@Nonnull public static Optional<Long> toLong (String value)

Parses the string argument as a Long by delegating to parseLong(String), but returns an Optional instead of throwing a NumberFormatException.

Parameters
value a String containing the Long representation to be parsed
Returns
  • an Optional<Long>, containing either the parsed Long value or nothing if the value could not be parsed