Class StringPrefix

java.lang.Object
kboyle.oktane.core.prefix.StringPrefix
All Implemented Interfaces:
Prefix

public class StringPrefix extends Object implements Prefix
Represents a String prefix.
  • Constructor Details

    • StringPrefix

      public StringPrefix(String 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