Skip to content

Commit

Permalink
Add the Visitor<T> interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosame committed Dec 17, 2020
1 parent 692fa2f commit cecf127
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/io/sf/carte/util/Visitor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
Copyright (c) 2005-2020, Carlos Amengual.
SPDX-License-Identifier: BSD-3-Clause
Licensed under a BSD-style License. You can find the license here:
https://css4j.github.io/LICENSE.txt
*/

package io.sf.carte.util;

/**
* A visitor (from the 'visitor' pattern).
*
* @param <T> the type to visit.
*/
public interface Visitor<T> {

/**
* Visit the given object.
*
* @param arg the object.
*/
void visit(T arg);

}

0 comments on commit cecf127

Please sign in to comment.