public abstract class

Operator

extends Object
java.lang.Object
   ↳ sun.tools.jstat.Operator

Class Overview

A typesafe enumeration for describing mathematical operators.

Summary

Fields
public static final Operator DIVIDE
public static final Operator MINUS
public static final Operator MULTIPLY
public static final Operator PLUS
Public Methods
static Operator toOperator(String s)
Maps a string to its corresponding Operator object.
String toString()
Returns the string representation of this Operator object.
Protected Methods
abstract double eval(double x, double y)
static Set keySet()
Returns an enumeration of the keys for this enumerated type
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static final Operator DIVIDE

public static final Operator MINUS

public static final Operator MULTIPLY

public static final Operator PLUS

Public Methods

public static Operator toOperator (String s)

Maps a string to its corresponding Operator object.

Parameters
s an string to match against Operator objects.
Returns
  • The Operator object matching the given string.

public String toString ()

Returns the string representation of this Operator object.

Returns
  • the string representation of this Operator object

Protected Methods

protected abstract double eval (double x, double y)

protected static Set keySet ()

Returns an enumeration of the keys for this enumerated type

Returns
  • The Operator object matching the given string.