-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
.../java/com/helger/phive/api/executorset/status/ValidationExecutorSetStatusHistoryItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package com.helger.phive.api.executorset.status; | ||
|
||
import java.time.OffsetDateTime; | ||
|
||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
import javax.annotation.concurrent.Immutable; | ||
|
||
import com.helger.commons.ValueEnforcer; | ||
import com.helger.commons.annotation.Nonempty; | ||
import com.helger.commons.string.ToStringGenerator; | ||
|
||
/** | ||
* This class contains a single history item of a VES status | ||
* | ||
* @author Philip Helger | ||
* @since 9.2.0 | ||
*/ | ||
@Immutable | ||
public class ValidationExecutorSetStatusHistoryItem | ||
{ | ||
private final OffsetDateTime m_aChangeDateTime; | ||
private final String m_sAuthor; | ||
private final String m_sChangeCode; | ||
private final String m_sText; | ||
|
||
public ValidationExecutorSetStatusHistoryItem (@Nonnull final OffsetDateTime aChangeDateTime, | ||
@Nonnull @Nonempty final String sAuthor, | ||
@Nullable final String sChangeCode, | ||
@Nonnull @Nonempty final String sText) | ||
{ | ||
ValueEnforcer.notNull (aChangeDateTime, "ChangeDateTime"); | ||
ValueEnforcer.notEmpty (sAuthor, "Author"); | ||
ValueEnforcer.notEmpty (sText, "Text"); | ||
m_aChangeDateTime = aChangeDateTime; | ||
m_sAuthor = sAuthor; | ||
m_sChangeCode = sChangeCode; | ||
m_sText = sText; | ||
} | ||
|
||
@Nonnull | ||
public final OffsetDateTime getChangeDateTime () | ||
{ | ||
return m_aChangeDateTime; | ||
} | ||
|
||
@Nonnull | ||
@Nonempty | ||
public String getAuthor () | ||
{ | ||
return m_sAuthor; | ||
} | ||
|
||
@Nullable | ||
public String getChangeCode () | ||
{ | ||
return m_sChangeCode; | ||
} | ||
|
||
@Nonnull | ||
@Nonempty | ||
public String getText () | ||
{ | ||
return m_sText; | ||
} | ||
|
||
@Override | ||
public String toString () | ||
{ | ||
return new ToStringGenerator (null).append ("ChangeDateTime", m_aChangeDateTime) | ||
.append ("Author", m_sAuthor) | ||
.append ("ChangeCode", m_sChangeCode) | ||
.append ("Text", m_sText) | ||
.getToString (); | ||
} | ||
} |