com.groupdocs.viewer.results

Class Layer

  • All Implemented Interfaces:
    com.aspose.ms.System.IEquatable<Layer>


    public final class Layer
    extends Object
    implements com.aspose.ms.System.IEquatable<Layer>

    Represents layer contained by the CAD drawing.

    • Constructor Detail

      • Layer

        public Layer(String name)

        Initializes new instance of Layer class.

        Parameters:
        name - The name of the layer.
        Throws:
        IllegalArgumentException - Thrown when name is null or empty.
      • Layer

        public Layer(String name,
             boolean visible)

        Initializes new instance of Layer class.

        Parameters:
        name - The name of the layer.
        visible - The layer visibility indicator.
        Throws:
        IllegalArgumentException - Thrown when name is null or empty.
    • Method Detail

      • equals

        public final boolean equals(Layer other)

        Determines whether the current Layer is the same as specified Layer object.

        Parameters:
        other - The object to compare with the current Layer object.
        Returns:
        true if both Layer objects are the same; otherwise, false
      • equals

        public boolean equals(Object obj)

        Determines whether the current Layer is the same as specified object.

        Specified by:
        equals in interface com.aspose.ms.System.IEquatable<Layer>
        Overrides:
        equals in class Object
        Parameters:
        obj - The object to compare with the current Layer object.
        Returns:
        true if obj parameter is Layer and is the same as current Layer object; otherwise, false
      • getName

        public final String getName()
        The name of the layer. Layer names are case sensitive.
        Returns:
        The name of the layer.
      • hashCode

        public int hashCode()

        Returns the hash code for the current Layer object.

        Overrides:
        hashCode in class Object
        Returns:
        A hash code for the current Layer object.
      • isEqualTo

        public static boolean isEqualTo(Layer left,
                        Layer right)

        Determines whether two Layer objects are the same.

        Parameters:
        left - Left Layer object.
        right - Right Layer object.
        Returns:
        true if both Layer objects are the same; otherwise, false
      • isNotEqualTo

        public static boolean isNotEqualTo(Layer left,
                           Layer right)

        Determines whether two Layer objects are not the same.

        Parameters:
        left - Left Layer object.
        right - Right Layer object.
        Returns:
        true if both Layer objects are not the same; otherwise, false
      • isVisible

        public final boolean isVisible()
        The layer visibility indicator.

        Note:

        he CAD drawing layers that are switched off or frozen are invisible. To render layers that are invisible, use CadOptions.getLayers() option.

        Returns:
        The layer visibility indicator.
      • toString

        public String toString()

        Returns a string that represents the current object.

        Overrides:
        toString in class Object
        Returns:
        A string that represents the current object.