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> E
Constructs an E adding given data entryConstructs an E adding given databoolean
static E
Constructs an E adding given causestatic E
fromCauseIf
(boolean condition, Supplier<E> e) Constructs an E adding given cause if condition holdsstatic E
fromCauses
(E... c) Constructs an E adding given causesstatic E
fromCauses
(List<E> c) Constructs an E adding given causesstatic E
fromCode
(int c) Constructs an E containing given codestatic <V> E
Constructs an E adding given data entrystatic E
Constructs an E adding given datastatic E
Constructs an E containing given messagestatic E
Constructs an E containing given namestatic E
fromNow()
Constructs an E containing time set to nowstatic E
fromThrowable
(Throwable throwable) Constructs an E from given [kotlin.Throwable]static E
Constructs an E containing given timeboolean
hasCause()
boolean
hasCode()
boolean
hasData()
int
hashCode()
boolean
boolean
hasName()
boolean
hasTime()
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
EException
containing 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
-