All Packages Class Hierarchy This Package Previous Next Index
Class pat.patInt
java.lang.Object
|
+----pat.patInt
- public class patInt
- extends Object
This is just an integer that can have infinite value.
It is used internally to implement the *, and + parts
of regular expressions.
- See Also:
- Multi
-
patInt()
- Initialize to zero.
-
patInt(int)
- Initialize to the value of init.
-
patInt(patInt)
- Initialize to the value of p.
-
dec()
- Decrement the value of this by 1.
-
equals(patInt)
- Test to see if two patterns are equal.
-
finite()
- Tests to see if this represents an infinite quantity.
-
inc()
- Increment the value of this by 1.
-
intValue()
- Converts to a patInt to an int.
-
lessEq(patInt)
- Test to see if this is less than or equal to j.
-
maxeq(patInt)
- If the argument p has a greater than this,
then set this object equal to p.
-
mineq(patInt)
- If the argument p has a smaller value than this,
then set this Object equal to p.
-
mul(patInt)
- Returns a patInt with value equal to the product
of the value of p and this.
-
pluseq(patInt)
- This would be operator+=(patInt) if I were programming
in C++.
-
setInf(boolean)
- set this int to infinity.
-
toString()
- Formats the pattern as a String.
patInt
public patInt()
- Initialize to zero.
patInt
public patInt(int init)
- Initialize to the value of init.
patInt
public patInt(patInt p)
- Initialize to the value of p.
setInf
public void setInf(boolean b)
- set this int to infinity.
inc
public final void inc()
- Increment the value of this by 1.
dec
public final void dec()
- Decrement the value of this by 1.
lessEq
public final boolean lessEq(patInt j)
- Test to see if this is less than or equal to j.
equals
public final boolean equals(patInt j)
- Test to see if two patterns are equal.
toString
public final String toString()
- Formats the pattern as a String. Contrary to
what you might expect, infinity is formatted as ""
- Overrides:
- toString in class Object
pluseq
public final patInt pluseq(patInt p)
- This would be operator+=(patInt) if I were programming
in C++.
mul
public final patInt mul(patInt p)
- Returns a patInt with value equal to the product
of the value of p and this.
mineq
public final patInt mineq(patInt p)
- If the argument p has a smaller value than this,
then set this Object equal to p.
maxeq
public final patInt maxeq(patInt p)
- If the argument p has a greater than this,
then set this object equal to p.
finite
public boolean finite()
- Tests to see if this represents an infinite quantity.
intValue
public int intValue()
- Converts to a patInt to an int. Infinity is
mapped Integer.MAX_VALUE;
All Packages Class Hierarchy This Package Previous Next Index