diff options
author | Sven Gothel <[email protected]> | 2019-09-07 18:48:42 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-09-07 18:48:42 +0200 |
commit | 125e4bd1c8e0a8f4b434209b155e6cd0d8f09092 (patch) | |
tree | b221b78623c891af56453b3d8eaff521d22ce0df /src/jogl/classes/com/jogamp | |
parent | 7f6d030ba91060aa4dedbf4311290c5cf5f61c4a (diff) |
Bug 1392: Simplify CapabilitiesFilter: Criteria -> Test, remove RemovalCriteria as all Test definitions may be used for anything.
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/GLCapabilitiesFilter.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/GLCapabilitiesFilter.java b/src/jogl/classes/com/jogamp/opengl/GLCapabilitiesFilter.java index d2479f47d..0d713d33b 100644 --- a/src/jogl/classes/com/jogamp/opengl/GLCapabilitiesFilter.java +++ b/src/jogl/classes/com/jogamp/opengl/GLCapabilitiesFilter.java @@ -39,18 +39,18 @@ import com.jogamp.nativewindow.CapabilitiesFilter; public class GLCapabilitiesFilter extends CapabilitiesFilter { protected GLCapabilitiesFilter() {} - public static class RemoveLessDepthBits<C extends GLCapabilitiesImmutable> implements RemovalCriteria<C> { + public static class TestLessDepthBits<C extends GLCapabilitiesImmutable> implements Test<C> { final int minDepthBits; - public RemoveLessDepthBits(final int minDepthBits) { + public TestLessDepthBits(final int minDepthBits) { this.minDepthBits = minDepthBits; } public final boolean match(final C cap) { return cap.getDepthBits() < minDepthBits; } } - public static class RemoveMoreDepthBits<C extends GLCapabilitiesImmutable> implements RemovalCriteria<C> { + public static class TestMoreDepthBits<C extends GLCapabilitiesImmutable> implements Test<C> { final int maxDepthBits; - public RemoveMoreDepthBits(final int maxDepthBits) { + public TestMoreDepthBits(final int maxDepthBits) { this.maxDepthBits = maxDepthBits; } public final boolean match(final C cap) { @@ -66,8 +66,8 @@ public class GLCapabilitiesFilter extends CapabilitiesFilter { */ public static <C extends GLCapabilitiesImmutable> ArrayList<C> removeLessDepthBits(final ArrayList<C> availableCaps, final int minDepthBits) { - final ArrayList<RemovalCriteria<C>> criteria = new ArrayList<RemovalCriteria<C>>(); - criteria.add(new RemoveLessDepthBits<C>(minDepthBits)); + final ArrayList<Test<C>> criteria = new ArrayList<Test<C>>(); + criteria.add(new TestLessDepthBits<C>(minDepthBits)); return CapabilitiesFilter.removeMatching(availableCaps, criteria); } } |