Example usage for java.util PropertyPermission equals

List of usage examples for java.util PropertyPermission equals

Introduction

In this page you can find the example usage for java.util PropertyPermission equals.

Prototype

@Override
public boolean equals(Object obj) 

Source Link

Document

Checks two PropertyPermission objects for equality.

Usage

From source file:Main.java

public static void main(String[] args) {
    PropertyPermission permission = new PropertyPermission("java.home.usr", "read");

    if (permission.equals(new PropertyPermission("java.home.usr", "read"))) {
        System.out.println("Has permissions on " + "java.home.usr" + " for read");
    }/*  www .ja  va  2 s . co m*/
    if (permission.equals(new PropertyPermission("java.home.usr", "write"))) {
        System.out.println("Has permissions on " + "java.home.usr" + " for write");
    }
}