org.beangle.commons.lang

Objects

Related Doc: package lang

object Objects

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Objects
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class CompareBuilder extends AnyRef

    Compare Builder

    Compare Builder

    Since

    4.2.4

  2. class EqualsBuilder extends AnyRef

    Equals Builder

    Equals Builder

    Since

    3.1.0

  3. class ToStringBuilder extends AnyRef

    Support class for Objects#toStringBuilder.

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def compareBuilder: CompareBuilder

  7. def default[T](clazz: Class[T]): T

    Annotations
    @inline()
  8. def defaultIfNull[T](value: T, defaultValue: T): T

    Returns a default value if the object passed is null.

    Returns a default value if the object passed is null.

    defaultIfNull(null, null)      = null
    defaultIfNull(null, "")        = ""
    defaultIfNull(null, "zz")      = "zz"
    defaultIfNull("abc", *)        = "abc"
    defaultIfNull(Boolean.TRUE, *) = Boolean.TRUE
    

    defaultValue

    the default value to return, may be null

    returns

    object if it is not null, defaultValue otherwise

    Since

    3.0

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(a: Array[Any], b: Array[Any]): Boolean

    Compares two object array for equality, where either one or both objects may be null.

    Compares two object array for equality, where either one or both objects may be null. Note: Don't user Any[_],fo after type erase ,it has same signature with equals(a:Any,b:Any)

  11. def equals(a: Any, b: Any): Boolean

    Compares two objects for equality, where either one or both objects may be null.

    Compares two objects for equality, where either one or both objects may be null.

    equals(null, null)                  = true
    equals(null, "")                    = false
    equals("", null)                    = false
    equals("", "")                      = true
    equals(Boolean.TRUE, null)          = false
    equals(Boolean.TRUE, "true")        = false
    equals(Boolean.TRUE, Boolean.TRUE)  = true
    equals(Boolean.TRUE, Boolean.FALSE) = false
    

    a

    the first object, may be null

    b

    the second object, may be null

    returns

    true if the values of both objects are the same

    Annotations
    @inline()
    Since

    3.0

  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def equalsBuilder: EqualsBuilder

  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def getIdentityHexString(obj: AnyRef): String

    Return a hex String form of an object's identity hash code.

    Return a hex String form of an object's identity hash code.

    obj

    the object

    returns

    the object's identity code in hex notation

  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(obj: AnyRef): String

    Gets the toString of an Object returning an empty string ("") if null input.

    Gets the toString of an Object returning an empty string ("") if null input.

    toString(null)         = ""
    toString("")           = ""
    toString("bat")        = "bat"
    toString(Boolean.TRUE) = "true"
    

    obj

    the Object to toString, may be null

    returns

    the passed in Object's toString, or nullStr if null input

    Since

    3.0

    See also

    String#valueOf(Object)

  24. def toString(): String

    Definition Classes
    AnyRef → Any
  25. def toStringBuilder(className: String): ToStringBuilder

    Creates an instance of ToStringBuilder in the same manner as Objects#toStringBuilder(Object), but using className instead of using an instance's Object#getClass().

    Creates an instance of ToStringBuilder in the same manner as Objects#toStringBuilder(Object), but using className instead of using an instance's Object#getClass().

    className

    the name of the instance type

  26. def toStringBuilder(clazz: Class[_]): ToStringBuilder

    Creates an instance of ToStringBuilder in the same manner as Objects#toStringBuilder(Object), but using the name of clazz instead of using an instance's Object#getClass().

    Creates an instance of ToStringBuilder in the same manner as Objects#toStringBuilder(Object), but using the name of clazz instead of using an instance's Object#getClass().

    clazz

    the Class of the instance

  27. def toStringBuilder(self: AnyRef): ToStringBuilder

    Creates an instance of ToStringBuilder.

    Creates an instance of ToStringBuilder.

    This is helpful for implementing Object#toString(). Specification by example:

    
      // Returns "ClassName{"
      Objects.toStringBuilder(this)
          .toString();
    
      // Returns "ClassName{x=1}"
      Objects.toStringBuilder(this)
          .add("x", 1)
          .toString();
    
      // Returns "MyObject{x=1}"
      Objects.toStringBuilder("MyObject")
          .add("x", 1)
          .toString();
    
      // Returns "ClassName{x=1, y=foo}"
      Objects.toStringBuilder(this)
          .add("x", 1)
          .add("y", "foo")
          .toString();
      }}
    
      // Returns "ClassName{x=1}"
      Objects.toStringBuilder(this)
          .omitNullValues()
          .add("x", 1)
          .add("y", null)
          .toString();
      }}
    

    self

    the object to generate the string for (typically this), used only for its class name

    Since

    3.1

  28. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped