- Polymorphism
- the ability of a variable, function, or object to take multiple forms
- to define one interface with multiple implementations
- compile-time: - using the same method name, but different signature
- run-time: - using a reference type to control which method is called
@Override
Annodation- Runtime polymorphism
- Java determins which version super/sub class method to execute based on reference type of call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.sun.javafx.application.PlatformImpl; | |
import java.awt.BorderLayout; | |
import java.awt.Dimension; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javafx.application.Platform; | |
import javafx.collections.ObservableList; | |
import javafx.embed.swing.JFXPanel; | |
import javafx.scene.Group; | |
import javafx.scene.Node; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fr.vinetos.util.scoreboard; | |
import fr.krilouja.game.team.Team; | |
import net.minecraft.server.v1_8_R3.IScoreboardCriteria; | |
import net.minecraft.server.v1_8_R3.PacketPlayOutScoreboardScore; | |
import org.bukkit.Bukkit; | |
import org.bukkit.entity.Player; | |
import java.lang.reflect.Field; | |
import java.util.Collections; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Utility class to read encrypted PEM files and generate a SSL Socket Factory based on the provided certificates. | |
* This utility also support an option to enable and disable server hostname verification. | |
* | |
* Note: Java use jks (Java KeyStore) format, but openssl usual use pem format. We can convert it by keytool (jdk build-in tool), or use | |
* BouncyCastle library to handle pem. | |
* | |
* The original code is by Sharon Asher (link below). I have modified it to use a newer version of the BouncyCastle Library (v1.68) | |
* Add below dependencies to work with this util. | |
* org.bouncycastle:bcpkix-jdk15on:1.68 |