Class CaseArgumentResolver<T>

  • Type Parameters:
    T - argument to resolve to
    All Implemented Interfaces:
    ArgumentResolver<T>

    public final class CaseArgumentResolver<T>
    extends java.lang.Object
    implements ArgumentResolver<T>
    Represents a cased ArgumentResolver. Works by retrieving the specified argument's specified case in the specified map. It isn't recommended to use this if you have only 1 case as the JVM will allocate more memory because of the map.
    • Constructor Summary

      Constructors 
      Constructor Description
      CaseArgumentResolver​(java.util.Map<java.lang.String,​T> cases)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T resolve​(@NotNull ArgumentResolverContext context)
      Resolves the input argument into the type this resolver resolves.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CaseArgumentResolver

        public CaseArgumentResolver​(java.util.Map<java.lang.String,​T> cases)