Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.text.rules
Class NumberRule


java.lang.Object
  extended by 
org.eclipse.jface.text.rules.NumberRule
All Implemented Interfaces:
IRule

public class NumberRule
extends Object
implements IRule

An implementation of IRule detecting a numerical value.


Field Summary
protected  int fColumn
          The column constraint
protected   IToken fToken
          The token to be returned when this rule is successful
protected static int UNDEFINED
          Internal setting for the un-initialized column constraint
 
Constructor Summary
NumberRule ( IToken token)
          Creates a rule which will return the specified token when a numerical sequence is detected.
 
Method Summary
  IToken evaluate ( ICharacterScanner scanner)
          Evaluates the rule by examining the characters available from the provided character scanner.
 void setColumnConstraint (int column)
          Sets a column constraint for this rule.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDEFINED

protected static final int UNDEFINED
Internal setting for the un-initialized column constraint

See Also:
Constant Field Values

fToken

protected 
IToken fToken
The token to be returned when this rule is successful


fColumn

protected int fColumn
The column constraint

Constructor Detail

NumberRule

public NumberRule(
IToken token)
Creates a rule which will return the specified token when a numerical sequence is detected.

Parameters:
token - the token to be returned
Method Detail

setColumnConstraint

public void setColumnConstraint(int column)
Sets a column constraint for this rule. If set, the rule's token will only be returned if the pattern is detected starting at the specified column. If the column is smaller then 0, the column constraint is considered removed.

Parameters:
column - the column in which the pattern starts

evaluate

public 
IToken evaluate(
ICharacterScanner scanner)
Description copied from interface: IRule
Evaluates the rule by examining the characters available from the provided character scanner. The token returned by this rule returns true when calling isUndefined, if the text that the rule investigated does not match the rule's requirements

Specified by:
evaluate in interface IRule
Parameters:
scanner - the character scanner to be used by this rule
Returns:
the token computed by the rule

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire