Skip to content

Commit

Permalink
Added AddonId.valueOf (used by the converter addon)
Browse files Browse the repository at this point in the history
This avoids the creation of a ConverterGenerator + Converter impl
  • Loading branch information
gastaldi committed Mar 14, 2014
1 parent ea04d42 commit 3529350
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
* Represents the ID of an {@link Addon}.
*
*
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
*/
public class AddonId implements Comparable<AddonId>
Expand Down Expand Up @@ -49,9 +49,17 @@ public String toString()
return toCoordinates();
}

/**
* Used by the converter addon
*/
public static AddonId valueOf(String coordinates)
{
return fromCoordinates(coordinates);
}

/**
* Attempt to parse the given string as {@link Addon} coordinates in the form: "group:name,version"
*
*
* @throws IllegalStateException when coordinates are malformed.
*/
public static AddonId fromCoordinates(final String coordinates) throws IllegalArgumentException
Expand Down

0 comments on commit 3529350

Please sign in to comment.