mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-02-27 21:31:33 +01:00
🛫 move id,track stuff into sync package
Took 33 minutes
This commit is contained in:
parent
5868d4d45e
commit
c335f49ac7
@ -18,8 +18,8 @@
|
||||
|
||||
package ca.tweetzy.auctionhouse.api.auction;
|
||||
|
||||
import ca.tweetzy.auctionhouse.api.Identifiable;
|
||||
import ca.tweetzy.auctionhouse.api.Trackable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Identifiable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Trackable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Synchronize;
|
||||
import ca.tweetzy.flight.utils.Filterer;
|
||||
import lombok.NonNull;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
package ca.tweetzy.auctionhouse.api.auction;
|
||||
|
||||
import ca.tweetzy.auctionhouse.api.Identifiable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Identifiable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Storeable;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -18,5 +18,19 @@
|
||||
|
||||
package ca.tweetzy.auctionhouse.api.auction;
|
||||
|
||||
import ca.tweetzy.auctionhouse.api.SortType;
|
||||
|
||||
public interface UserSettings {
|
||||
|
||||
//======================================================================//
|
||||
// Filtering Options //
|
||||
//======================================================================//
|
||||
|
||||
ListingType getFilterListingType();
|
||||
|
||||
void setFilterListingType(ListingType listingType);
|
||||
|
||||
SortType getFilterSortType();
|
||||
|
||||
void setFilterSortType(SortType sortType);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package ca.tweetzy.auctionhouse.api.ban;
|
||||
|
||||
import ca.tweetzy.auctionhouse.api.Identifiable;
|
||||
import ca.tweetzy.auctionhouse.api.Trackable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Identifiable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Trackable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Storeable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.SynchronizeResult;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Unstoreable;
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
package ca.tweetzy.auctionhouse.api.statistic;
|
||||
|
||||
import ca.tweetzy.auctionhouse.api.Identifiable;
|
||||
import ca.tweetzy.auctionhouse.api.Trackable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Identifiable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Trackable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Storeable;
|
||||
import ca.tweetzy.auctionhouse.auction.enums.AuctionStatisticType;
|
||||
import lombok.NonNull;
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
package ca.tweetzy.auctionhouse.api.statistic;
|
||||
|
||||
import ca.tweetzy.auctionhouse.api.Navigable;
|
||||
import ca.tweetzy.auctionhouse.api.sync.Navigable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@ -46,4 +46,9 @@ public enum StatisticType implements Navigable<StatisticType> {
|
||||
public StatisticType previous() {
|
||||
return values()[(ordinal() - 1 + values().length) % values().length];
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<StatisticType> enumClass() {
|
||||
return StatisticType.class;
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package ca.tweetzy.auctionhouse.api;
|
||||
package ca.tweetzy.auctionhouse.api.sync;
|
||||
|
||||
import lombok.NonNull;
|
||||
|
@ -16,11 +16,25 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package ca.tweetzy.auctionhouse.api;
|
||||
package ca.tweetzy.auctionhouse.api.sync;
|
||||
|
||||
public interface Navigable<E extends Enum<E>> {
|
||||
|
||||
E next();
|
||||
default E next() {
|
||||
E[] values = enumClass().getEnumConstants();
|
||||
E current = (E) this;
|
||||
int ordinal = current.ordinal();
|
||||
int nextOrdinal = (ordinal + 1) % values.length;
|
||||
return values[nextOrdinal];
|
||||
}
|
||||
|
||||
E previous();
|
||||
default E previous() {
|
||||
E[] values = enumClass().getEnumConstants();
|
||||
E current = (E) this;
|
||||
int ordinal = current.ordinal();
|
||||
int previousOrdinal = (ordinal - 1 + values.length) % values.length;
|
||||
return values[previousOrdinal];
|
||||
}
|
||||
|
||||
Class<E> enumClass();
|
||||
}
|
@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package ca.tweetzy.auctionhouse.api;
|
||||
package ca.tweetzy.auctionhouse.api.sync;
|
||||
|
||||
public interface Trackable {
|
||||
|
@ -68,6 +68,7 @@ public class BinListing extends AuctionItem {
|
||||
this.ownerUUID = ownerUUID;
|
||||
this.ownerName = ownerName;
|
||||
this.currency = currency;
|
||||
this.currencyItem = currencyItem;
|
||||
this.binPrice = price;
|
||||
this.listedWorld = listedWorld;
|
||||
this.listedServer = listedServer;
|
||||
|
Loading…
Reference in New Issue
Block a user