Class CharPrefix

java.lang.Object
kboyle.oktane.core.prefix.CharPrefix
Type Parameters:
CONTEXT -
All Implemented Interfaces:
Prefix

public class CharPrefix extends Object implements Prefix
Represents a Prefix that is only a single character.
  • Constructor Details

    • CharPrefix

      public CharPrefix(char prefix)
  • Method Details

    • find

      public int find(CommandContext context)
      Description copied from interface: Prefix
      Returns the index after the prefix, -1 if not found.
      Specified by:
      find in interface Prefix
      Parameters:
      context - The current execution CommandContext.
      Returns:
      The index where the current prefix ends, -1 if not found.
    • value

      public Object value()
      Specified by:
      value in interface Prefix
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object