Class Align

  • All Implemented Interfaces:
    java.io.Serializable

    public class Align
    extends java.lang.Object
    implements java.io.Serializable
    Represents a text (or another element) align.

    The number of objects of this class is finete and accesible only by final variables or the method get(int).

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Align​(int code, java.lang.String description)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object object)  
      static Align get​(int code)
      Obtain align associated to indicated code.
      static Align[] getAll()
      All available aligns.
      int getCode()  
      java.lang.String getDescription()  
      int hashCode()  
      boolean isCenter()
      Facilitates ask about what type of align is this.
      boolean isDefault()
      Facilitates ask about what type of align is this.
      boolean isLeft()
      Facilitates ask about what type of align is this.
      boolean isRight()
      Facilitates ask about what type of align is this.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • DEFAULT

        public static final Align DEFAULT
      • LEFT

        public static final Align LEFT
      • CENTER

        public static final Align CENTER
      • RIGHT

        public static final Align RIGHT
    • Constructor Detail

      • Align

        protected Align​(int code,
                        java.lang.String description)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • get

        public static Align get​(int code)
        Obtain align associated to indicated code.

        Throws:
        java.lang.IllegalStateException - If code does not match with a existing align.
      • getCode

        public int getCode()
      • getDescription

        public java.lang.String getDescription()
      • getAll

        public static Align[] getAll()
        All available aligns.

        Returns:
        Not null
      • isCenter

        public boolean isCenter()
        Facilitates ask about what type of align is this.

        Returns:
        true if this.equals(Align.CENTER)
      • isDefault

        public boolean isDefault()
        Facilitates ask about what type of align is this.

        Returns:
        true if this.equals(Align.DEFAULT)
      • isRight

        public boolean isRight()
        Facilitates ask about what type of align is this.

        Returns:
        true if this.equals(Align.RIGHT)
      • isLeft

        public boolean isLeft()
        Facilitates ask about what type of align is this.

        Returns:
        true if this.equals(Align.LEFT)
      • toString

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