001package fr.aumgn.bukkitutils.command.arg.impl; 002 003import fr.aumgn.bukkitutils.command.arg.CommandArg; 004 005public abstract class AbstractCommandArg<V> implements CommandArg<V> { 006 007 protected final String string; 008 009 public AbstractCommandArg(String string) { 010 this.string = string; 011 } 012 013 @Override 014 public V valueOr(V def) { 015 if (string == null) { 016 return def; 017 } 018 019 return value(); 020 } 021}