Class StringToIdentifiable<T extends org.core.utils.Identifiable>

java.lang.Object
org.ships.config.parsers.identify.StringToIdentifiable<T>
All Implemented Interfaces:
org.core.config.parser.Parser<String,T>, org.core.config.parser.StringParser<T>, org.core.config.parser.StringParser.Suggestible<T>
Direct Known Subclasses:
StringToBlockFinder, StringToCrewPermission, StringToMovement, StringToShipTypeParser, StringToShipTypeParser.StringToHostCloneableShipTypeParser

public class StringToIdentifiable<T extends org.core.utils.Identifiable> extends Object implements org.core.config.parser.StringParser.Suggestible<T>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.core.config.parser.StringParser

    org.core.config.parser.StringParser.Suggestible<T extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Class<T>
     

    Fields inherited from interface org.core.config.parser.Parser

    STRING_TO_BLOCK_POSITION, STRING_TO_BLOCK_TYPE, STRING_TO_BOOLEAN, STRING_TO_COMPONENT, STRING_TO_DOUBLE, STRING_TO_EXACT_POSITION, STRING_TO_INTEGER, STRING_TO_ITEM_TYPE, STRING_TO_MINECRAFT_TIME_UNIT, STRING_TO_POSITIVE_INTEGER, STRING_TO_STRING_PARSER, STRING_TO_TEXT, STRING_TO_TIME, STRING_TO_TIME_RANGE, STRING_TO_UNIQUE_ID, STRING_TO_VECTOR3INT, STRING_TO_WORLD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    parse(String original)
     
    unparse(T value)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.core.config.parser.StringParser.Suggestible

    getStringSuggestions, getStringSuggestions
  • Field Details

    • class1

      protected final Class<T extends org.core.utils.Identifiable> class1
  • Constructor Details

    • StringToIdentifiable

      public StringToIdentifiable(Class<T> class1)
  • Method Details

    • parse

      public Optional<T> parse(String original)
      Specified by:
      parse in interface org.core.config.parser.Parser<String,T extends org.core.utils.Identifiable>
    • unparse

      public String unparse(T value)
      Specified by:
      unparse in interface org.core.config.parser.Parser<String,T extends org.core.utils.Identifiable>
    • getSuggestions

      public List<T> getSuggestions(String peek)
      Specified by:
      getSuggestions in interface org.core.config.parser.StringParser.Suggestible<T extends org.core.utils.Identifiable>
    • getSuggestions

      public List<T> getSuggestions()
      Specified by:
      getSuggestions in interface org.core.config.parser.StringParser.Suggestible<T extends org.core.utils.Identifiable>