Skip to content

Commit

Permalink
Revert "Weaken access modifiers and add some accessors to ComparableV…
Browse files Browse the repository at this point in the history
…ersion"

This reverts commit e35d341.
  • Loading branch information
stephan-gh committed Aug 27, 2016
1 parent 908ab04 commit 0d95068
Showing 1 changed file with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,7 @@ public class ComparableVersion

private ListItem items;

public ListItem getItems() {
return this.items;
}

public interface Item
private interface Item
{
int INTEGER_ITEM = 0;
int STRING_ITEM = 1;
Expand All @@ -116,7 +112,7 @@ public interface Item
/**
* Represents a numeric item in the version item list.
*/
public static class IntegerItem
private static class IntegerItem
implements Item
{
private static final BigInteger BIG_INTEGER_ZERO = new BigInteger( "0" );
Expand All @@ -135,10 +131,6 @@ public IntegerItem( String str )
this.value = new BigInteger( str );
}

public BigInteger getValue() {
return this.value;
}

public int getType()
{
return INTEGER_ITEM;
Expand Down Expand Up @@ -181,7 +173,7 @@ public String toString()
/**
* Represents a string in the version item list, usually a qualifier.
*/
public static class StringItem
private static class StringItem
implements Item
{
private static final String[] QUALIFIERS = { "alpha", "beta", "milestone", "rc", "snapshot", "", "sp" };
Expand Down Expand Up @@ -227,10 +219,6 @@ public StringItem( String value, boolean followedByDigit )
this.value = ALIASES.getProperty( value , value );
}

public String getValue() {
return this.value;
}

public int getType()
{
return STRING_ITEM;
Expand Down Expand Up @@ -294,7 +282,7 @@ public String toString()
* Represents a version list item. This class is used both for the global item list and for sub-lists (which start
* with '-(number)' in the version specification).
*/
public static class ListItem
private static class ListItem
extends ArrayList<Item>
implements Item
{
Expand Down

0 comments on commit 0d95068

Please sign in to comment.