1 package com.github.javaparser.ast.nodeTypes.modifiers; 2 3 import com.github.javaparser.ast.Node; 4 import com.github.javaparser.ast.nodeTypes.NodeWithModifiers; 5 6 import static com.github.javaparser.ast.Modifier.Keyword.PRIVATE; 7 8 /** 9 * A node that can be private. 10 */ 11 public interface NodeWithPrivateModifier<N extends Node> extends NodeWithModifiers<N> { isPrivate()12 default boolean isPrivate() { 13 return hasModifier(PRIVATE); 14 } 15 16 @SuppressWarnings("unchecked") setPrivate(boolean set)17 default N setPrivate(boolean set) { 18 return setModifier(PRIVATE, set); 19 } 20 } 21