Skip to content

Commit

Permalink
updating random function
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffroy committed Aug 8, 2011
1 parent 4bdfa84 commit b14ff5c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/opaide/editors/opasrc/SEPARATORS.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ private SEPARATORS() {
public String getTextRep() {
return sub.getTextRep();
}

public static SEPARATORS random() {
Random r = new Random();
return values()[r.nextInt(values().length)];
}

public boolean isWordStart(char c) {
return sub.isWordStart(c);
Expand All @@ -58,5 +53,9 @@ public boolean isWordStart(char c) {
public boolean isWordPart(char c) {
return sub.isWordPart(c);
}

public static SEPARATORS random() {
return EnumRandom.random(values());
}

}

0 comments on commit b14ff5c

Please sign in to comment.