diff options
Diffstat (limited to 'src/main/java/sevenUnits/utils/Nameable.java')
-rw-r--r-- | src/main/java/sevenUnits/utils/Nameable.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/sevenUnits/utils/Nameable.java b/src/main/java/sevenUnits/utils/Nameable.java index 15026b7..efd1ab8 100644 --- a/src/main/java/sevenUnits/utils/Nameable.java +++ b/src/main/java/sevenUnits/utils/Nameable.java @@ -24,12 +24,14 @@ import java.util.Set; * and symbol data should be immutable. * * @since 2020-09-07 + * @since v0.3.0 */ public interface Nameable { /** * @return a name for the object - if there's a primary name, it's that, * otherwise the symbol, otherwise "Unnamed" * @since 2022-02-26 + * @since v0.4.0 */ default String getName() { final NameSymbol ns = this.getNameSymbol(); @@ -40,12 +42,14 @@ public interface Nameable { * @return a {@code NameSymbol} that contains this object's primary name, * symbol and other names * @since 2020-09-07 + * @since v0.3.0 */ NameSymbol getNameSymbol(); /** * @return set of alternate names * @since 2020-09-07 + * @since v0.3.0 */ default Set<String> getOtherNames() { return this.getNameSymbol().getOtherNames(); @@ -54,6 +58,7 @@ public interface Nameable { /** * @return preferred name of object * @since 2020-09-07 + * @since v0.3.0 */ default Optional<String> getPrimaryName() { return this.getNameSymbol().getPrimaryName(); @@ -63,6 +68,7 @@ public interface Nameable { * @return a short name for the object - if there's a symbol, it's that, * otherwise the symbol, otherwise "Unnamed" * @since 2022-02-26 + * @since v0.4.0 */ default String getShortName() { final NameSymbol ns = this.getNameSymbol(); @@ -72,6 +78,7 @@ public interface Nameable { /** * @return short symbol representing object * @since 2020-09-07 + * @since v0.3.0 */ default Optional<String> getSymbol() { return this.getNameSymbol().getSymbol(); |