-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generic project re-structuration (#106)
- Loading branch information
1 parent
b679bf4
commit 14e02fa
Showing
124 changed files
with
5,364 additions
and
3,740 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
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
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
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
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
113 changes: 0 additions & 113 deletions
113
src/main/java/me/srrapero720/watermedia/WaterMedia.java
This file was deleted.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
src/main/java/me/srrapero720/watermedia/api/MediaContext.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,50 @@ | ||
package me.srrapero720.watermedia.api; | ||
|
||
public interface MediaContext { | ||
|
||
/** | ||
* Provides the context unique identifier (like a mod id) | ||
* This helps on debugging to find who do the wrong call | ||
* @return a unique identifier in range of [a-z][1-9] | ||
*/ | ||
String id(); | ||
|
||
/** | ||
* Elegant name for the logger and crash report handlers, it can be not unique | ||
* @return a fancy string with the name of your project | ||
*/ | ||
String name(); | ||
|
||
/** | ||
* Preference is established for lower qualities when the exact wanted quality is missing | ||
* @return true if it should prefer lower qualities, false otherwise | ||
*/ | ||
boolean preferLowerQuality(); | ||
|
||
/** | ||
* Very quick and simple implementation of a MediaModContext, no answers, no questions, just a context | ||
*/ | ||
final class Simple implements MediaContext { | ||
private final String id; | ||
private final String name; | ||
public Simple(String id, String name) { | ||
this.id = id; | ||
this.name = name; | ||
} | ||
|
||
@Override public String id() { return id; } | ||
@Override public String name() { return name; } | ||
@Override public boolean preferLowerQuality() { return false; } | ||
} | ||
|
||
final class Static { | ||
private final String id; | ||
private final String name; | ||
private final boolean prefferLowerQuality; | ||
public Static(String id, String name, boolean preferLowerQuality) { | ||
this.id = id; | ||
this.name = name; | ||
this.prefferLowerQuality = preferLowerQuality; | ||
} | ||
} | ||
} |
Oops, something went wrong.