Class ProxyGR<P extends Pointer<?,​?,​P>,​T extends Tok<P>>

java.lang.Object
xyz.cofe.text.tparse.ProxyGR<P,​T>
All Implemented Interfaces:
java.util.function.Function<P,​java.util.Optional<T>>, GR<P,​T>

public class ProxyGR<P extends Pointer<?,​?,​P>,​T extends Tok<P>>
extends java.lang.Object
implements GR<P,​T>
  • Constructor Summary

    Constructors 
    Constructor Description
    ProxyGR​(GR<P,​T> initial)  
  • Method Summary

    Modifier and Type Method Description
    java.util.Optional<T> apply​(P ptr)  
    ProxyGR<P,​T> conf​(java.util.function.Consumer<ProxyGR<P,​T>> conf)  
    GR<P,​? extends T> getTarget()  
    java.lang.String name()
    Возвращает имя правила.
    ProxyGR<P,​T> name​(java.lang.String name)
    Указывает имя правила.
    void setTarget​(GR<P,​? extends T> newTarget)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.function.Function

    andThen, compose

    Methods inherited from interface xyz.cofe.text.tparse.GR

    another, next, repeat
  • Constructor Details

  • Method Details

    • conf

      public ProxyGR<P,​T> conf​(java.util.function.Consumer<ProxyGR<P,​T>> conf)
    • getTarget

      public GR<P,​? extends T> getTarget()
    • setTarget

      public void setTarget​(GR<P,​? extends T> newTarget)
    • apply

      public java.util.Optional<T> apply​(P ptr)
      Specified by:
      apply in interface java.util.function.Function<P extends Pointer<?,​?,​P>,​T extends Tok<P>>
    • name

      public ProxyGR<P,​T> name​(java.lang.String name)
      Description copied from interface: GR
      Указывает имя правила. Желательно это правило переопределить, по умолчанию используется медленная реализация GRNameImpl
      Specified by:
      name in interface GR<P extends Pointer<?,​?,​P>,​T extends Tok<P>>
      Parameters:
      name - имя
      Returns:
      self ссылка
    • name

      public java.lang.String name()
      Description copied from interface: GR
      Возвращает имя правила. Желательно это правило переопределить, по умолчанию используется медленная реализация GRNameImpl
      Specified by:
      name in interface GR<P extends Pointer<?,​?,​P>,​T extends Tok<P>>
      Returns:
      имя или null
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object