br.com.objectos.git
Class Identification

java.lang.Object
  extended by br.com.objectos.git.Identification
All Implemented Interfaces:
br.com.objectos.core.object.ToStringObject

public final class Identification
extends Object
implements br.com.objectos.core.object.ToStringObject

Represents the author or the commiter of a commit object.

Since:
1

Method Summary
 boolean equals(Object obj)
          Compares the specified object with this identification for equality.
 void formatToString(StringBuilder toString, int level)
          Formats and appends to the toString builder at the specified indentation level a string representation of this id.
 String getEmail()
          Returns the e-mail addresss associated with this identification.
 String getGitTimeZone()
          Return the timezone associated with this identification.
 String getName()
          Return the name associated with this identification.
 long getSeconds()
          Return the date, as seconds since UNIX epoch, associated with this identification.
 int hashCode()
          Returns the hash code value of this identification.
 String print()
          Returns a string representation of the form name <email> seconds timezone.
 void setEmail(String newEmail)
          Sets the e-mail address value.
 void setName(String newName)
          Sets the name value.
 String toString()
          Returns the string representation of this identification as defined by the ToStringObject.formatToString(StringBuilder, int) method.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

equals

public final boolean equals(Object obj)
Compares the specified object with this identification for equality.

Returns true if and only if the specified object is also a Identification instance and if both instances have the same email, time zone, name and timestamp.

Overrides:
equals in class Object
Parameters:
obj - the object to be compared for equality with this identification
Returns:
true if the specified object is equal to this identification

formatToString

public final void formatToString(StringBuilder toString,
                                 int level)
Formats and appends to the toString builder at the specified indentation level a string representation of this id.

The string representation may contain:

Specified by:
formatToString in interface br.com.objectos.core.object.ToStringObject
Parameters:
toString - the builder of a toString method
level - the indentation level.

getEmail

public final String getEmail()
Returns the e-mail addresss associated with this identification.

Returns:
the e-mail addresss associated with this identification

getGitTimeZone

public final String getGitTimeZone()
Return the timezone associated with this identification.

Returns:
the timezone associated with this identification

getName

public final String getName()
Return the name associated with this identification.

Returns:
the name associated with this identification

getSeconds

public final long getSeconds()
Return the date, as seconds since UNIX epoch, associated with this identification.

Returns:
the date, as seconds since UNIX epoch, associated with this identification

hashCode

public final int hashCode()
Returns the hash code value of this identification.

Overrides:
hashCode in class Object
Returns:
the hash code value of this identification

print

public final String print()
Returns a string representation of the form name <email> seconds timezone.

Returns:
a string representation

setEmail

public final void setEmail(String newEmail)
Sets the e-mail address value.

Parameters:
newEmail - the new e-mail address value

setName

public final void setName(String newName)
Sets the name value.

Parameters:
newName - the new name value

toString

public final String toString()
Returns the string representation of this identification as defined by the ToStringObject.formatToString(StringBuilder, int) method.

Overrides:
toString in class Object
Returns:
the string representation of this identification


Copyright © 2020–2021 Objectos Software LTDA. All rights reserved.