Class ImmutableTrees.TextLine

    • Field Detail

      • newline

        private final boolean newline
    • Method Detail

      • newline

        public boolean newline()
        Overrides:
        newline in class Trees.TextLine
        Returns:
        The value of the newline attribute
      • withFragment

        public final ImmutableTrees.TextLine withFragment​(Trees.TextFragment value)
        Copy the current immutable object by setting a value for the fragment attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for fragment
        Returns:
        A modified copy of the this object
      • withNewline

        public final ImmutableTrees.TextLine withNewline​(boolean value)
        Copy the current immutable object by setting a value for the newline attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for newline
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of TextLine that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: fragment, newline.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • copyOf

        public static ImmutableTrees.TextLine copyOf​(Trees.TextLine instance)
        Creates an immutable copy of a Trees.TextLine value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable TextLine instance
      • builder

        public static ImmutableTrees.TextLine.Builder builder()
        Creates a builder for TextLine.
         ImmutableTrees.TextLine.builder()
            .fragment(org.immutables.generator.processor.Trees.TextFragment) // required fragment
            .newline(boolean) // optional newline
            .build();
         
        Returns:
        A new TextLine builder