Skip to content

Commit

Permalink
Dart 3.0 interface classes
Browse files Browse the repository at this point in the history
  • Loading branch information
suragch committed May 11, 2023
1 parent 72ba9f2 commit 57622c4
Show file tree
Hide file tree
Showing 30 changed files with 33 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Node<T> {
}
}

abstract class LinkedList<E> {
abstract interface class LinkedList<E> {
Node<E>? head;
Node<E>? tail;
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 06-queues/projects/challenge/bin/challenge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ extension BoardGameManager<E> on QueueRingBuffer<E> {
/// back,
/// }
///
/// abstract class Deque<E> {
/// abstract interface class Deque<E> {
/// bool get isEmpty;
/// E? peek(Direction from);
/// bool enqueue(E element, Direction to);
Expand Down
2 changes: 1 addition & 1 deletion 06-queues/projects/challenge/lib/deque.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ enum Direction {
back,
}

abstract class Deque<E> {
abstract interface class Deque<E> {
bool get isEmpty;
E? peek(Direction from);
bool enqueue(E element, Direction to);
Expand Down
2 changes: 1 addition & 1 deletion 06-queues/projects/challenge/lib/queue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import 'linked_list.dart';
import 'ring_buffer.dart';

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 06-queues/projects/final/lib/queue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import 'linked_list.dart';
import 'ring_buffer.dart';

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 08-trees/projects/challenge/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 08-trees/projects/final/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 08-trees/projects/starter/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
abstract class Queue<E> {
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 15-priority-queues/projects/challenge/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 15-priority-queues/projects/final/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 15-priority-queues/projects/starter/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 21-graphs/projects/challenge/lib/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge<T> {

enum EdgeType { directed, undirected }

abstract class Graph<E> {
abstract interface class Graph<E> {
Iterable<Vertex<E>> get vertices;

Vertex<E> createVertex(E data);
Expand Down
2 changes: 1 addition & 1 deletion 21-graphs/projects/final/lib/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge<T> {

enum EdgeType { directed, undirected }

abstract class Graph<E> {
abstract interface class Graph<E> {
Iterable<Vertex<E>> get vertices;

Vertex<E> createVertex(E data);
Expand Down
2 changes: 1 addition & 1 deletion 22-breadth-first-search/projects/challenge/lib/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge<T> {

enum EdgeType { directed, undirected }

abstract class Graph<E> {
abstract interface class Graph<E> {
Iterable<Vertex<E>> get vertices;

Vertex<E> createVertex(E data);
Expand Down
2 changes: 1 addition & 1 deletion 22-breadth-first-search/projects/challenge/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 22-breadth-first-search/projects/final/lib/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge<T> {

enum EdgeType { directed, undirected }

abstract class Graph<E> {
abstract interface class Graph<E> {
Iterable<Vertex<E>> get vertices;

Vertex<E> createVertex(E data);
Expand Down
2 changes: 1 addition & 1 deletion 22-breadth-first-search/projects/final/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 22-breadth-first-search/projects/starter/lib/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge<T> {

enum EdgeType { directed, undirected }

abstract class Graph<E> {
abstract interface class Graph<E> {
Iterable<Vertex<E>> get vertices;

Vertex<E> createVertex(E data);
Expand Down
2 changes: 1 addition & 1 deletion 22-breadth-first-search/projects/starter/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 23-depth-first-search/projects/challenge/lib/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge<T> {

enum EdgeType { directed, undirected }

abstract class Graph<E> {
abstract interface class Graph<E> {
Iterable<Vertex<E>> get vertices;

Vertex<E> createVertex(E data);
Expand Down
2 changes: 1 addition & 1 deletion 23-depth-first-search/projects/challenge/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 23-depth-first-search/projects/final/lib/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge<T> {

enum EdgeType { directed, undirected }

abstract class Graph<E> {
abstract interface class Graph<E> {
Iterable<Vertex<E>> get vertices;

Vertex<E> createVertex(E data);
Expand Down
2 changes: 1 addition & 1 deletion 23-depth-first-search/projects/starter/lib/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge<T> {

enum EdgeType { directed, undirected }

abstract class Graph<E> {
abstract interface class Graph<E> {
Iterable<Vertex<E>> get vertices;

Vertex<E> createVertex(E data);
Expand Down
2 changes: 1 addition & 1 deletion 24-dijkstras-algorithm/projects/challenge/lib/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge<T> {

enum EdgeType { directed, undirected }

abstract class Graph<E> {
abstract interface class Graph<E> {
Iterable<Vertex<E>> get vertices;

Vertex<E> createVertex(E data);
Expand Down
2 changes: 1 addition & 1 deletion 24-dijkstras-algorithm/projects/challenge/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 24-dijkstras-algorithm/projects/final/lib/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge<T> {

enum EdgeType { directed, undirected }

abstract class Graph<E> {
abstract interface class Graph<E> {
Iterable<Vertex<E>> get vertices;

Vertex<E> createVertex(E data);
Expand Down
2 changes: 1 addition & 1 deletion 24-dijkstras-algorithm/projects/final/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down
2 changes: 1 addition & 1 deletion 24-dijkstras-algorithm/projects/starter/lib/graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge<T> {

enum EdgeType { directed, undirected }

abstract class Graph<E> {
abstract interface class Graph<E> {
Iterable<Vertex<E>> get vertices;

Vertex<E> createVertex(E data);
Expand Down
2 changes: 1 addition & 1 deletion 24-dijkstras-algorithm/projects/starter/lib/queue.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2023 Kodeco Inc.
// For full license & permission details, see LICENSE.

abstract class Queue<E> {
abstract interface class Queue<E> {
bool enqueue(E element);
E? dequeue();
bool get isEmpty;
Expand Down

0 comments on commit 57622c4

Please sign in to comment.