@Test public void testAsMacAddressString() { assertThat(asMacAddressString(0L), equalTo("00:00:00:00:00:00")); assertThat(asMacAddressString(0x012345ABCDEFL), equalTo("01:23:45:ab:cd:ef")); assertThat(asMacAddressString(0xFFFFFFFFFFFFL), equalTo("ff:ff:ff:ff:ff:ff")); }
@VisibleForTesting static @Nonnull String asMacAddressString(long longVal) { return String.join(":", Splitter.fixedLength(2).split(String.format("%012x", longVal))); }
MacAddress implements Comparable<MacAddress>, Serializable { @VisibleForTesting static @Nonnull String asMacAddressString(long longVal) { return String.join(":", Splitter.fixedLength(2).split(String.format("%012x", longVal))); } }
MacAddress implements Comparable<MacAddress>, Serializable { @VisibleForTesting static @Nonnull String asMacAddressString(long longVal) { return String.join(":", Splitter.fixedLength(2).split(String.format("%012x", longVal))); } private  MacAddress(long longVal); }
MacAddress implements Comparable<MacAddress>, Serializable { @VisibleForTesting static @Nonnull String asMacAddressString(long longVal) { return String.join(":", Splitter.fixedLength(2).split(String.format("%012x", longVal))); } private  MacAddress(long longVal); static @Nonnull MacAddress of(long longVal); static @Nonnull MacAddress parse(String macAddressStr); long asLong(); @Override int compareTo(MacAddress o); @Override boolean equals(Object obj); @Override int hashCode(); @JsonValue @Override @Nonnull String toString(); }
MacAddress implements Comparable<MacAddress>, Serializable { @VisibleForTesting static @Nonnull String asMacAddressString(long longVal) { return String.join(":", Splitter.fixedLength(2).split(String.format("%012x", longVal))); } private  MacAddress(long longVal); static @Nonnull MacAddress of(long longVal); static @Nonnull MacAddress parse(String macAddressStr); long asLong(); @Override int compareTo(MacAddress o); @Override boolean equals(Object obj); @Override int hashCode(); @JsonValue @Override @Nonnull String toString();  }