Class NullDataConverter<T>

  • Type Parameters:
    T - the target type
    Direct Known Subclasses:
    CommandDataConverter, PluginDataConverter

    public abstract class NullDataConverter<T>
    extends DataConverter<T>
    Simplify the DataConverter class. Implement the accept method. The accept method returns true if the result of converting the String argument is not null, false otherwise.
    • Constructor Detail

      • NullDataConverter

        public NullDataConverter()
    • Method Detail

      • accept

        protected boolean accept​(String arg)
        Description copied from class: DataConverter
        Indicate whether this String argument is this target type or not
        Specified by:
        accept in class DataConverter<T>
        Parameters:
        arg - the target argument in String
        Returns:
        true if this String argument can convert to this target type, false otherwise