Android Open Source - logcat-activity-android Log Entry






From Project

Back to project page logcat-activity-android.

License

The source code is released under:

Apache License

If you think the Android project logcat-activity-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package io.leftshift.logcat;
//w  ww  . j av  a  2  s  . c  o m
public class LogEntry {
  private Level level = Level.V;
  private String text = null;
  private Integer hash = null;

  public LogEntry(String text, Level level) {
    this.text = text;
    this.level = level;
  }

  public Level getLevel() {
    return level;
  }

  public String getText() {
    return text;
  }

  @Override
  public int hashCode() {
    if (hash == null) {
      final int prime = 31;
      int result = 1;
      result = prime * result + ((level == null) ? 0 : level.hashCode());
      result = prime * result + ((text == null) ? 0 : text.hashCode());
      hash = result;
    }

    return hash;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    LogEntry other = (LogEntry) obj;
    if (level != other.level)
      return false;
    if (text == null) {
      if (other.text != null)
        return false;
    } else if (!text.equals(other.text))
      return false;
    return true;
  }
}




Java Source Code List

io.leftshift.logcat.Buffer.java
io.leftshift.logcat.Buffer.java
io.leftshift.logcat.FilterDialog.java
io.leftshift.logcat.FilterDialog.java
io.leftshift.logcat.Format.java
io.leftshift.logcat.Format.java
io.leftshift.logcat.Level.java
io.leftshift.logcat.Level.java
io.leftshift.logcat.LogEntryAdapter.java
io.leftshift.logcat.LogEntryAdapter.java
io.leftshift.logcat.LogEntry.java
io.leftshift.logcat.LogEntry.java
io.leftshift.logcat.LogcatActivity.java
io.leftshift.logcat.LogcatActivity.java
io.leftshift.logcat.Logcat.java
io.leftshift.logcat.Logcat.java
io.leftshift.logcat.Prefs.java
io.leftshift.logcat.Prefs.java
io.leftshift.logcatsample.MainActivity.java