Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD


Class COM.stevesoft.pat.patInt

java.lang.Object
  |
  +--COM.stevesoft.pat.patInt

public class patInt
extends java.lang.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:
pat.Multi

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

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

 

Constructor Detail

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.
Method Detail

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 java.lang.String toString()
Formats the pattern as a String. Contrary to what you might expect, infinity is formatted as ""
Overrides:
toString in class java.lang.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;

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD