Class ImmutableTrees.Newline

  • All Implemented Interfaces:
    Trees.TextPart
    Enclosing class:
    ImmutableTrees

    @Immutable
    public static final class ImmutableTrees.Newline
    extends Trees.Newline
    Immutable implementation of Trees.Newline.

    Use the static factory method to get the default singleton instance: ImmutableTrees.Newline.of().

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Newline()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object another)
      This instance is equal to all instances of Newline that have equal attribute values.
      int hashCode()
      Returns a constant hash code value.
      static ImmutableTrees.Newline of()
      Returns the default immutable singleton value of Newline
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Newline

        private Newline()
    • Method Detail

      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of Newline that have equal attribute values. As instances of the Newline class are interned, the equals method is implemented as an efficient reference equality check.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Returns a constant hash code value.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • of

        public static ImmutableTrees.Newline of()
        Returns the default immutable singleton value of Newline
        Returns:
        An immutable instance of Newline