Interval

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.core.parser.JFlex
Class Interval

    java.lang.Object
      weka.core.parser.JFlex.Interval

    public final class Interval

extends java.lang.Object

An intervall of characters with basic operations.

Version:
  JFlex 1.4.1, $Revision: 1.1 $, $Date: 2008-05-09 09:14:11 $
Author:
  Gerwin Klein

Field Summary
`char` | `end`
`char` | `start`

Constructor Summary
`Interval(char start, char end)` Constuct a new intervall from `start` to `end`.
`Interval(Interval other)` Copy constructor

Method Summary
`boolean` | `contains(char point)` Return `true` iff `point` is contained in this intervall.
`boolean` | `contains(Interval other)` Return `true` iff this intervall completely contains the other one.
`Interval` | `copy()` Make a copy of this interval.
`boolean` | `equals(java.lang.Object o)` Return `true` if `o` is an intervall with the same borders.
`void` | `setEnd(char end)` Set a new last character
`void` | `setStart(char start)` Set a new first character
`java.lang.String` | `toString()` Get a String representation of this intervall.

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### start

    public char start

### end

    public char end

Constructor Detail

### Interval

    public Interval(char start,
                    char end)

  Constuct a new intervall from `start` to `end`.

  Parameters:
    `start` - first character the intervall should contain
    `end` - last character the intervall should contain

### Interval

    public Interval(Interval other)

  Copy constructor

Method Detail

### contains

    public boolean contains(char point)

  Return `true` iff `point` is contained in this intervall.

  Parameters:
    `point` - the character to check

### contains

    public boolean contains(Interval other)

  Return `true` iff this intervall completely contains the other one.

  Parameters:
    `other` - the other intervall

### equals

    public boolean equals(java.lang.Object o)

  Return `true` if `o` is an intervall with the same borders.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `o` - the object to check equality with

### setEnd

    public void setEnd(char end)

  Set a new last character

  Parameters:
    `end` - the new last character of this intervall

### setStart

    public void setStart(char start)

  Set a new first character

  Parameters:
    `start` - the new first character of this intervall

### toString

    public java.lang.String toString()

  Get a String representation of this intervall.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string `"[start-end]"` or `"[start]"` (if there is only one character in the intervall) where `start` and `end` are either a number (the character code) or something of the from `'a'`.

### copy

    public Interval copy()

  Make a copy of this interval.

  Returns:
    the copy

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD