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

Constructor Index

 o patInt()
Initialize to zero.
 o patInt(int)
Initialize to the value of init.
 o patInt(patInt)
Initialize to the value of p.

Method Index

 o dec()
Decrement the value of this by 1.
 o equals(patInt)
Test to see if two patterns are equal.
 o finite()
Tests to see if this represents an infinite quantity.
 o inc()
Increment the value of this by 1.
 o intValue()
Converts to a patInt to an int.
 o lessEq(patInt)
Test to see if this is less than or equal to j.
 o maxeq(patInt)
If the argument p has a greater than this, then set this object equal to p.
 o mineq(patInt)
If the argument p has a smaller value than this, then set this Object equal to p.
 o mul(patInt)
Returns a patInt with value equal to the product of the value of p and this.
 o pluseq(patInt)
This would be operator+=(patInt) if I were programming in C++.
 o setInf(boolean)
set this int to infinity.
 o toString()
Formats the pattern as a String.

Constructors

 o patInt
  public patInt()
Initialize to zero.

 o patInt
  public patInt(int init)
Initialize to the value of init.

 o patInt
  public patInt(patInt p)
Initialize to the value of p.

Methods

 o setInf
  public void setInf(boolean b)
set this int to infinity.

 o inc
  public final void inc()
Increment the value of this by 1.

 o dec
  public final void dec()
Decrement the value of this by 1.

 o lessEq
  public final boolean lessEq(patInt j)
Test to see if this is less than or equal to j.

 o equals
  public final boolean equals(patInt j)
Test to see if two patterns are equal.

 o 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
 o pluseq
  public final patInt pluseq(patInt p)
This would be operator+=(patInt) if I were programming in C++.

 o mul
  public final patInt mul(patInt p)
Returns a patInt with value equal to the product of the value of p and this.

 o mineq
  public final patInt mineq(patInt p)
If the argument p has a smaller value than this, then set this Object equal to p.

 o maxeq
  public final patInt maxeq(patInt p)
If the argument p has a greater than this, then set this object equal to p.

 o finite
  public boolean finite()
Tests to see if this represents an infinite quantity.

 o 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