Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Publish package to the Maven Central Repository

on:
release:
types: [created]

jobs:
deploy:
uses: FontysVenlo/alda_api_workflows/.github/workflows/deploy.yml@main
secrets: inherit
with:
tag: ${{ github.event.release.tag_name }}
12 changes: 0 additions & 12 deletions .github/workflows/publish.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Java CI with Maven

on:
pull_request:
branches: [ main ]

jobs:
build:
uses: FontysVenlo/alda_api_workflows/.github/workflows/pullrequest.yml@main
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
public interface Queue<E> {
/**
* Check if the stack contains any elements
* Check if the stack contains any elements.
*
* @return true if stack is empty
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface Stack<E> {
E peek();

/**
* Check if the stack contains any elements
* Check if the stack contains any elements.
*
* @return true if stack is empty
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,44 @@
import io.github.fontysvenlo.alda.stacks_queues_api.Queue;
import io.github.fontysvenlo.alda.stacks_queues_api.Stack;

/**
* Configuration for stacks and queues.
*/
public interface StackQueueConfiguration {
/**
* Wether the configuration is active (should be tested).
* @return true if active
*/
boolean isActive();

/**
* Get the name of the configuration.
*
* @return the name
*/
String getName();

/**
* For which type is this configuration.
* @return the type
*/
StackQueue getType();

/**
* Get the stack if a stack configuration.
*
* @param <E> the generic type for the stack
* @return the stack
* @throws NullPointerException if not a stack type
*/
<E> Stack<E> getStack();

/**
* Get the queue if a queue configuration.
*
* @param <E> the generic type for the queue
* @return the queue
* @throws NullPointerException if not a queue type
*/
<E> Queue<E> getQueue();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

import java.util.stream.Stream;

/**
* Factory to get all configurations.
*/
public interface StackQueueFactory {

/**
* Get all the configurations.
* @return Stream of configurations
*/
Stream<StackQueueConfiguration> streamConfigurations();
}