Algorithmic Sets: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
imported>Mkurz Keine Bearbeitungszusammenfassung |
imported>Mkurz Keine Bearbeitungszusammenfassung |
||
| Zeile 4: | Zeile 4: | ||
<pre> | <pre> | ||
public interface Predicate<T>{ | public interface Predicate<T>{ | ||
// If test returns true, we consider the element be part of the algorithmic set. | |||
boolean test(T element); | |||
} | } | ||
</pre> | </pre> | ||
Version vom 8. November 2014, 08:46 Uhr
Definition Algorithmic Set
- We want to define an algorithmic set via a Predicate deciding if an element is part of the set.
- In java we could use the functional interface Predicate<T>
public interface Predicate<T>{
// If test returns true, we consider the element be part of the algorithmic set.
boolean test(T element);
}