Package org.apache.commons.lang3.mutable

Examples of org.apache.commons.lang3.mutable.MutableInt


    @Override
    public int compareTo(
        @NotNull(message = "other can't be NULL") final RepoCommit other
    ) {
        return new CompareToBuilder().append(
            this.repo().coordinates(),
            other.repo().coordinates()
        ).append(this.sha(), other.sha()).build();
    }
View Full Code Here


    @Override
    public int compareTo(
        @NotNull(message = "cont should not be NULL") final Content cont
    ) {
        return new CompareToBuilder()
            .append(this.path(), cont.path())
                .append(this.repo().coordinates(), cont.repo().coordinates())
            .build();
    }
View Full Code Here

        @Override
        public int compareTo(
            @NotNull(message = "label can't be NULL") final Label label
        ) {
            return new CompareToBuilder()
                .append(this.repo().coordinates(), label.repo().coordinates())
                .append(this.obj, label.name())
                .build();
        }
View Full Code Here

        }
        @Override
        public int compareTo(
            @NotNull(message = "other can't be NULL") final Coordinates other
        ) {
            return new CompareToBuilder()
                .append(this.usr, other.user())
                .append(this.rpo, other.repo())
                .build();
        }
View Full Code Here

    @Override
    public boolean equals(final Object other) {
      if (!(other instanceof RowColIndex))
        return false;
      RowColIndex castOther = (RowColIndex) other;
      return new EqualsBuilder().append(rowKey, castOther.rowKey).append(colIndex, castOther.colIndex)
          .isEquals();
    }
View Full Code Here

    }

    @Override
    public int hashCode()
    {
        HashCodeBuilder builder = new HashCodeBuilder(373, 75437)
                .append(metadata)
                .append(deletionInfo());
        for (Cell cell : this)
            builder.append(cell);
        return builder.toHashCode();
    }
View Full Code Here

    }

    @Override
    public int hashCode()
    {
        HashCodeBuilder builder = new HashCodeBuilder(373, 75437)
                .append(metadata)
                .append(deletionInfo());
        for (Column column : this)
            builder.append(column);
        return builder.toHashCode();
    }
View Full Code Here

    }
  }

  @Override
  public String toString() {
    final ToStringBuilder sb = new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE);
    if (ArrayUtils.isNotEmpty(configurationClasses)) {
      final String[] names = new String[configurationClasses.length];
      for (int i = 0; i < names.length; i++) {
        names[i] = configurationClasses[i].getName();
      }
      sb.append("configurationClasses", Arrays.toString(names));
    }
    if (ArrayUtils.isNotEmpty(configurationPackages)) {
      final String[] names = new String[configurationPackages.length];
      for (int i = 0; i < names.length; i++) {
        names[i] = configurationPackages[i].getName();
      }
      sb.append("configurationPackages", Arrays.toString(names));
    }

    if (!CollectionUtils.isEmpty(jvmSystemProperties)) {
      final StringWriter sw = new StringWriter(256);
      try {
        jvmSystemProperties.store(sw, "JVM System Propperties");
      } catch (final IOException e) {
        throw new RuntimeException(e);
      }
      sb.append("jvmSystemProperties", sw.toString());
    }
    return sb.toString();
  }
View Full Code Here

        assertEquals(baseStr + "[a=<size=0>]", new ToStringBuilder(base).append("a", (Object) new String[0], false).toString());
        assertEquals(baseStr + "[a={}]", new ToStringBuilder(base).append("a", (Object) new String[0], true).toString());
    }

    public void testPerson() {
        Person p = new Person();
        p.name = "John Doe";
        p.age = 33;
        p.smoker = false;
        String pBaseStr = p.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(p));
        assertEquals(pBaseStr + "[name=John Doe,age=33,smoker=false]", new ToStringBuilder(p).append("name", p.name).append("age", p.age).append("smoker", p.smoker).toString());
    }
View Full Code Here

        assertEquals("<size=0>", new ToStringBuilder(base).append("a", (Object) new String[0], false).toString());
        assertEquals("{}", new ToStringBuilder(base).append("a", (Object) new String[0], true).toString());
    }

    public void testPerson() {
        Person p = new Person();
        p.name = "Jane Q. Public";
        p.age = 47;
        p.smoker = false;
        assertEquals("Jane Q. Public,47,false", new ToStringBuilder(p).append("name", p.name).append("age", p.age).append("smoker", p.smoker).toString());
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.lang3.mutable.MutableInt

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.