@Test (expected = IllegalArgumentException.class) public void invalidNames2() { assertThat(InstanceCoordinate.parse("æ.ø.å.a"), is(nullValue())); }
public static InstanceCoordinate parse(final String string) { if (string == null) { return null; } final Matcher matcher = COORDINATE_PATTERN.matcher(string); if (!matcher.matches()) { return null; } final String[] path = new String[] { matcher.group(4), matcher.group(3), matcher.group(2), matcher.group(1) }; return new InstanceCoordinate(new CloudnamePath(path)); }
InstanceCoordinate { public static InstanceCoordinate parse(final String string) { if (string == null) { return null; } final Matcher matcher = COORDINATE_PATTERN.matcher(string); if (!matcher.matches()) { return null; } final String[] path = new String[] { matcher.group(4), matcher.group(3), matcher.group(2), matcher.group(1) }; return new InstanceCoordinate(new CloudnamePath(path)); } }
InstanceCoordinate { public static InstanceCoordinate parse(final String string) { if (string == null) { return null; } final Matcher matcher = COORDINATE_PATTERN.matcher(string); if (!matcher.matches()) { return null; } final String[] path = new String[] { matcher.group(4), matcher.group(3), matcher.group(2), matcher.group(1) }; return new InstanceCoordinate(new CloudnamePath(path)); } InstanceCoordinate(final CloudnamePath path); }
InstanceCoordinate { public static InstanceCoordinate parse(final String string) { if (string == null) { return null; } final Matcher matcher = COORDINATE_PATTERN.matcher(string); if (!matcher.matches()) { return null; } final String[] path = new String[] { matcher.group(4), matcher.group(3), matcher.group(2), matcher.group(1) }; return new InstanceCoordinate(new CloudnamePath(path)); } InstanceCoordinate(final CloudnamePath path); String getRegion(); String getTag(); String getService(); String getInstance(); String toCanonicalString(); static InstanceCoordinate parse(final String string); @Override String toString(); }
InstanceCoordinate { public static InstanceCoordinate parse(final String string) { if (string == null) { return null; } final Matcher matcher = COORDINATE_PATTERN.matcher(string); if (!matcher.matches()) { return null; } final String[] path = new String[] { matcher.group(4), matcher.group(3), matcher.group(2), matcher.group(1) }; return new InstanceCoordinate(new CloudnamePath(path)); } InstanceCoordinate(final CloudnamePath path); String getRegion(); String getTag(); String getService(); String getInstance(); String toCanonicalString(); static InstanceCoordinate parse(final String string); @Override String toString();  }