Create SnapshotMetadata class in prepartion of snapshot tokens

This commit is contained in:
Keir Nellyer 2016-10-07 18:25:20 +01:00
parent a4e1fb3c8d
commit e4d3621512

View File

@ -0,0 +1,43 @@
package mineplex.core.chatsnap;
import java.util.Optional;
public class SnapshotMetadata
{
private final int _id;
protected String _token = null;
protected Integer _creatorId = null;
public SnapshotMetadata(int id, String token, int creatorId)
{
_id = id;
_token = token;
_creatorId = creatorId;
}
public SnapshotMetadata(int id, int creatorId)
{
_id = id;
_creatorId = creatorId;
}
public SnapshotMetadata(int id)
{
_id = id;
}
public int getId()
{
return _id;
}
public Optional<String> getToken()
{
return Optional.ofNullable(_token);
}
public Optional<Integer> getCreatorId()
{
return Optional.ofNullable(_creatorId);
}
}