Package e.java
Class E
java.lang.Object
e.java.E
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConstructs an E adding given causeConstructs an E adding given cause if condition holdscauses()Constructs an E adding given causesConstructs an E adding given causescode()code(int c) Constructs an E containing given codedata()<V> EConstructs an E adding given data entryConstructs an E adding given databooleanstatic EConstructs an E adding given causestatic EfromCauseIf(boolean condition, Supplier<E> e) Constructs an E adding given cause if condition holdsstatic EfromCauses(E... c) Constructs an E adding given causesstatic EfromCauses(List<E> c) Constructs an E adding given causesstatic EfromCode(int c) Constructs an E containing given codestatic <V> EConstructs an E adding given data entrystatic EConstructs an E adding given datastatic EConstructs an E containing given messagestatic EConstructs an E containing given namestatic EfromNow()Constructs an E containing time set to nowstatic EfromThrowable(Throwable throwable) Constructs an E from given [kotlin.Throwable]static EConstructs an E containing given timebooleanhasCause()booleanhasCode()booleanhasData()inthashCode()booleanbooleanhasName()booleanhasTime()message()Constructs an E containing given messagename()Constructs an E containing given namenow()Constructs an E containing time set to nowtime()time(long t) Constructs an E containing given time<A> EOr<A> toEOr()Converts this E to a failed EOr<A>Converts this E into an exceptiontoString()
-
Field Details
-
empty
An empty E
-
-
Constructor Details
-
E
-
-
Method Details
-
code
-
name
-
message
-
causes
-
data
-
time
-
code
Constructs an E containing given code- Parameters:
c- A code- Returns:
- A new E containing given code
-
name
-
message
-
causes
-
causes
-
cause
-
data
-
data
-
time
Constructs an E containing given time- Parameters:
t- A time- Returns:
- A new E containing given time
-
now
Constructs an E containing time set to now- Returns:
- A new E containing time set to now
- See Also:
-
causeIf
-
hasCode
public boolean hasCode()- Returns:
- Whether or not a code is set
-
hasName
public boolean hasName()- Returns:
- Whether or not a name is set
-
hasMessage
public boolean hasMessage()- Returns:
- Whether or not a message is set
-
hasCause
public boolean hasCause()- Returns:
- Whether or not a cause is set
-
hasData
public boolean hasData()- Returns:
- Whether or not a data is set
-
hasTime
public boolean hasTime()- Returns:
- Whether or not a time is set
-
toEOr
Converts this E to a failed EOr<A>- Type Parameters:
A- The A type in resulting EOr- Returns:
- An EOr<A> containing this E
- See Also:
-
toException
Converts this E into an exception- Returns:
- An
EExceptioncontaining this E
-
equals
-
hashCode
-
toString
-
fromCode
Constructs an E containing given code- Parameters:
c- A code- Returns:
- A new E containing given code
-
fromName
-
fromMessage
-
fromCauses
-
fromCauses
-
fromCause
-
fromData
-
fromData
-
fromTime
-
fromNow
Constructs an E containing time set to now- Returns:
- A new E containing time set to now
- See Also:
-
fromCauseIf
-
fromThrowable
-