Miscellaneous Docs
Fall 2026
API

# TravelCard

o1.people.TravelCard
class TravelCard(val `id`: Int)

A `TravelCard` object represents a travel card meant for accessing public transportation. A travel card may be valid or invalid; a card’s status can be set as invalid, if the allocated time expires or if the card is stolen, for instance.

## Parameters

id

  a number that identifies the travel card from others

## Attributes

Graph
Supertypes
  class Object
  trait Matchable
  class Any

## Members list

### Value members

#### Concrete methods

override def toString: String

Returns a compact string description of the person.

Returns a compact string description of the person.

## Attributes

Definition Classes
  Any

#### Concrete fields

val id: Int
var isValid: Boolean

whether the travel card is valid or not

whether the travel card is valid or not

## Attributes