mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-01-23 15:21:20 +01:00
🆕 create tracking interfaces
Took 14 seconds
This commit is contained in:
parent
05120857c1
commit
9c87f768ea
32
src/main/java/ca/tweetzy/auctionhouse/api/Identifiable.java
Normal file
32
src/main/java/ca/tweetzy/auctionhouse/api/Identifiable.java
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Auction House
|
||||
* Copyright 2023 Kiran Hart
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package ca.tweetzy.auctionhouse.api;
|
||||
|
||||
import lombok.NonNull;
|
||||
|
||||
public interface Identifiable<T> {
|
||||
|
||||
/**
|
||||
* The identifier for the group.
|
||||
*
|
||||
* @return The id of the group.
|
||||
*/
|
||||
@NonNull
|
||||
T getId();
|
||||
}
|
26
src/main/java/ca/tweetzy/auctionhouse/api/Navigable.java
Normal file
26
src/main/java/ca/tweetzy/auctionhouse/api/Navigable.java
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Auction House
|
||||
* Copyright 2023 Kiran Hart
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package ca.tweetzy.auctionhouse.api;
|
||||
|
||||
public interface Navigable<E extends Enum<E>> {
|
||||
|
||||
E next();
|
||||
|
||||
E previous();
|
||||
}
|
36
src/main/java/ca/tweetzy/auctionhouse/api/Trackable.java
Normal file
36
src/main/java/ca/tweetzy/auctionhouse/api/Trackable.java
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Auction House
|
||||
* Copyright 2023 Kiran Hart
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package ca.tweetzy.auctionhouse.api;
|
||||
|
||||
public interface Trackable {
|
||||
|
||||
/**
|
||||
* Time when the element was created
|
||||
*
|
||||
* @return created time
|
||||
*/
|
||||
long getTimeCreated();
|
||||
|
||||
/**
|
||||
* Time when element was last updated
|
||||
*
|
||||
* @return last updated time
|
||||
*/
|
||||
long getLastUpdated();
|
||||
}
|
Loading…
Reference in New Issue
Block a user