[code] public class BadRegExpMatcher { public BadRegExpMatcher(String regExp); /** Attempts to match the specified regular exPRession against the input text, returning the matched text if possible or null if not */ public String match(String inputText); } [/code]
BetterRegExpMatcher
[code] class BetterRegExpMatcher { public BetterRegExpMatcher(...); /** Provide matchers for multiple formats of input -- String, character array, and subset of character array. Return -1 if no match was made; return offset of match start if a match was made. */ public int match(String inputText); public int match(char[] inputText); public int match(char[] inputText, int offset, int length); /** If a match was made, returns the length of the match; between the offset and the length, the caller should be able to reconstrUCt the match text from the offset and length */ public int getMatchLength(); /** Convenience routine to get the match string, in the event the caller happens to wants a String */ public String getMatchText(); } [/code]
[code] int x = component.getBounds().x; int y = component.getBounds().y; int h = component.getBounds().height; int w = component.getBounds().width; [/code]