diff --git a/core/modules/filter/src/Entity/FilterFormat.php b/core/modules/filter/src/Entity/FilterFormat.php
index 4b00af1..9107e9f 100644
--- a/core/modules/filter/src/Entity/FilterFormat.php
+++ b/core/modules/filter/src/Entity/FilterFormat.php
@@ -75,7 +75,7 @@ class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, En
    *
    * @var int
    */
-  public $weight = 0;
+  protected $weight = 0;
 
   /**
    * List of user role IDs to grant access to use this format on initial creation.
@@ -128,6 +128,52 @@ public function id() {
   /**
    * {@inheritdoc}
    */
+  public function getWeight() {
+    return $this->weight;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getRoles() {
+    return $this->roles;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function isCacheable() {
+    return $this->cache > 0;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setWeight($weight) {
+    $this->weight = $weight;
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setRoles($roles) {
+    $this->roles = $roles;
+    return $this;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setCache($cache) {
+    $this->cache = $cache;
+    return $this;
+  }
+
+
+  /**
+   * {@inheritdoc}
+   */
   public function filters($instance_id = NULL) {
     if (!isset($this->filterCollection)) {
       $this->filterCollection = new FilterPluginCollection(\Drupal::service('plugin.manager.filter'), $this->filters);
diff --git a/core/modules/filter/src/FilterFormatFormBase.php b/core/modules/filter/src/FilterFormatFormBase.php
index b6abf1a..39e0587 100644
--- a/core/modules/filter/src/FilterFormatFormBase.php
+++ b/core/modules/filter/src/FilterFormatFormBase.php
@@ -150,11 +150,11 @@ public function form(array $form, FormStateInterface $form_state) {
         '#default_value' => $filter->status,
         '#parents' => array('filters', $name, 'status'),
         '#description' => $filter->getDescription(),
-        '#weight' => $filter->weight,
+        '#weight' => $filter->getWeight(),
       );
 
       $form['filters']['order'][$name]['#attributes']['class'][] = 'draggable';
-      $form['filters']['order'][$name]['#weight'] = $filter->weight;
+      $form['filters']['order'][$name]['#weight'] = $filter->getWeight();
       $form['filters']['order'][$name]['filter'] = array(
         '#markup' => $filter->getLabel(),
       );
@@ -163,7 +163,7 @@ public function form(array $form, FormStateInterface $form_state) {
         '#title' => $this->t('Weight for @title', array('@title' => $filter->getLabel())),
         '#title_display' => 'invisible',
         '#delta' => 50,
-        '#default_value' => $filter->weight,
+        '#default_value' => $filter->getWeight(),
         '#parents' => array('filters', $name, 'weight'),
         '#attributes' => array('class' => array('filter-order-weight')),
       );
@@ -181,7 +181,7 @@ public function form(array $form, FormStateInterface $form_state) {
           '#type' => 'details',
           '#title' => $filter->getLabel(),
           '#open' => TRUE,
-          '#weight' => $filter->weight,
+          '#weight' => $filter->getWeight(),
           '#parents' => array('filters', $name, 'settings'),
           '#group' => 'filter_settings',
         );
diff --git a/core/modules/filter/src/FilterFormatInterface.php b/core/modules/filter/src/FilterFormatInterface.php
index b5e75ce..81043fa 100644
--- a/core/modules/filter/src/FilterFormatInterface.php
+++ b/core/modules/filter/src/FilterFormatInterface.php
@@ -84,4 +84,60 @@ public function getFilterTypes();
    */
   public function getHtmlRestrictions();
 
+  /**
+   * Returns the weight of the format in the text format selector.
+   *
+   * @return int
+   *   The weight of this format.
+   */
+  public function getWeight();
+
+  /**
+   * Returns the list of user role IDS.
+   *
+   * @return array
+   *   The role ID list.
+   */
+  public function getRoles();
+
+  /**
+   * Returns the cache status.
+   *
+   * @return bool
+   *   TRUE if the filter is cached.
+   */
+  public function isCacheable();
+
+  /**
+   * Sets the weight to the given value.
+   *
+   * @param int $weight
+   *   The desired weight.
+   *
+   * @return $this
+   */
+  public function setWeight($weight);
+
+  /**
+   * Sets the list of user role IDs to the given array.
+   *
+   * @param array $roles
+   *   The desired user role ID array.
+   *
+   * @return \Drupal\filter\FilterFormatInterface
+   *   The class instance this method is called on.
+   */
+  public function setRoles($roles);
+
+  /**
+   * Sets the cache value (whether or not text of this format can be cached).
+   *
+   * @param bool $cache
+   *   The desired cache value.
+   *
+   * @return \Drupal\filter\FilterFormatInterface
+   *   The class instance this method is called on.
+   */
+  public function setCache($cache);
+
 }
diff --git a/core/modules/filter/src/FilterPluginCollection.php b/core/modules/filter/src/FilterPluginCollection.php
index 3e32470..54aaa9f 100644
--- a/core/modules/filter/src/FilterPluginCollection.php
+++ b/core/modules/filter/src/FilterPluginCollection.php
@@ -98,8 +98,8 @@ public function sortHelper($aID, $bID) {
     if ($a->status != $b->status) {
       return !empty($a->status) ? -1 : 1;
     }
-    if ($a->weight != $b->weight) {
-      return $a->weight < $b->weight ? -1 : 1;
+    if ($a->getWeight() != $b->getWeight()) {
+      return $a->getWeight() < $b->getWeight() ? -1 : 1;
     }
     if ($a->provider != $b->provider) {
       return strnatcasecmp($a->provider, $b->provider);
diff --git a/core/modules/filter/src/Tests/FilterAdminTest.php b/core/modules/filter/src/Tests/FilterAdminTest.php
index de3ab11..dfdec33 100644
--- a/core/modules/filter/src/Tests/FilterAdminTest.php
+++ b/core/modules/filter/src/Tests/FilterAdminTest.php
@@ -227,7 +227,7 @@ function testFilterAdmin() {
       }
     }
     // Ensure that the second filter is now before the first filter.
-    $this->assertEqual($filter_format->filters($second_filter)->weight + 1, $filter_format->filters($first_filter)->weight, 'Order confirmed in configuration.');
+    $this->assertEqual($filter_format->filters($second_filter)->getWeight() + 1, $filter_format->filters($first_filter)->getWeight(), 'Order confirmed in configuration.');
 
     // Add format.
     $edit = array();
diff --git a/core/modules/filter/src/Tests/FilterCrudTest.php b/core/modules/filter/src/Tests/FilterCrudTest.php
index 70ea342..d1ee6fe 100644
--- a/core/modules/filter/src/Tests/FilterCrudTest.php
+++ b/core/modules/filter/src/Tests/FilterCrudTest.php
@@ -84,7 +84,7 @@ function verifyTextFormat($format) {
     $filter_format = entity_load('filter_format', $format->format);
     $this->assertEqual($filter_format->format, $format->format, format_string('filter_format_load: Proper format id for text format %format.', $t_args));
     $this->assertEqual($filter_format->name, $format->name, format_string('filter_format_load: Proper title for text format %format.', $t_args));
-    $this->assertEqual($filter_format->weight, $format->weight, format_string('filter_format_load: Proper weight for text format %format.', $t_args));
+    $this->assertEqual($filter_format->getWeight, $format->getWeight, format_string('filter_format_load: Proper weight for text format %format.', $t_args));
     // Check that the filter was created in site default language.
     $this->assertEqual($format->language()->getId(), $default_langcode, format_string('filter_format_load: Proper language code for text format %format.', $t_args));
   }
diff --git a/core/modules/filter/src/Tests/FilterDefaultConfigTest.php b/core/modules/filter/src/Tests/FilterDefaultConfigTest.php
index 84ea0b9..5007719 100644
--- a/core/modules/filter/src/Tests/FilterDefaultConfigTest.php
+++ b/core/modules/filter/src/Tests/FilterDefaultConfigTest.php
@@ -40,13 +40,13 @@ function testInstallation() {
     $this->assertTrue((bool) $format);
     $this->assertEqual($format->id(), 'filter_test');
     $this->assertEqual($format->label(), 'Test format');
-    $this->assertEqual($format->get('weight'), 2);
+    $this->assertEqual($format->getWeight(), 2);
 
     // Verify that format default property values have been added/injected.
     $this->assertTrue($format->uuid());
 
     // Verify that the loaded format does not contain any roles.
-    $this->assertEqual($format->get('roles'), NULL);
+    $this->assertEqual($format->getRoles(), NULL);
     // Verify that the defined roles in the default config have been processed.
     $this->assertEqual(array_keys(filter_get_roles_by_format($format)), array(
       DRUPAL_ANONYMOUS_RID,
@@ -83,7 +83,7 @@ function testUpdateRoles() {
     ));
 
     // Attempt to change roles.
-    $format->set('roles', array(
+    $format->setRoles(array(
       DRUPAL_AUTHENTICATED_RID,
     ));
     $format->save();
diff --git a/core/modules/filter/src/Tests/FilterFormatMethodsTest.php b/core/modules/filter/src/Tests/FilterFormatMethodsTest.php
new file mode 100644
index 0000000..148da9c
--- /dev/null
+++ b/core/modules/filter/src/Tests/FilterFormatMethodsTest.php
@@ -0,0 +1,78 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\filter\Tests\FilterFormatMethodsTest.
+ */
+
+namespace Drupal\filter\Tests;
+
+use Drupal\simpletest\KernelTestBase;
+
+/**
+ * Tests get and set methods on text format interface.
+ *
+ * @group block
+ */
+class FilterFormatMethodsTest extends KernelTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('filter');
+
+  /**
+   * Text format object.
+   *
+   * @var object
+   */
+  private $format;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    parent::setUp();
+
+    $this->format = entity_create('filter_format', array());
+    $this->format->format = 'custom_format';
+    $this->format->name = 'Custom format';
+    $this->format->setFilterConfig('filter_url', array(
+      'status' => 1,
+      'settings' => array(
+        'filter_url_length' => 30,
+      ),
+    ));
+    $this->format->save();
+  }
+
+  /**
+   * Tests weight get and set method.
+   */
+  function testGetWeight() {
+    $weight = 0;
+    $this->assertIdentical(spl_object_hash($this->format->setWeight($weight)), spl_object_hash($this->format), format_string('Test weight set method for text format %format.', array('%format' => $this->format->name)));
+    $this->assertIdentical($this->format->getWeight(), $weight, format_string('Test weight get method for text format %format.', array('%format' => $this->format->name)));
+  }
+
+  /**
+   * Tests roles get and set method.
+   */
+  function testGetRoles() {
+    $roles = array(0,1);
+    $this->assertIdentical(spl_object_hash($this->format->setRoles($roles)), spl_object_hash($this->format), format_string('Test roles set method for text format %format.', array('%format' => $this->format->name)));
+    $this->assertIdentical($this->format->getRoles(), $roles, format_string('Test roles get method for text format %format.', array('%format' => $this->format->name)));
+  }
+
+  /**
+   * Tests cache get and set method.
+   */
+  function testIsCacheable() {
+    $is_cacheable = TRUE;
+    $this->assertIdentical(spl_object_hash($this->format->setCache($is_cacheable)), spl_object_hash($this->format), format_string('Test cache set method for text format %format.', array('%format' => $this->format->name)));
+    $this->assertIdentical($this->format->isCacheable(), $is_cacheable, format_string('Test cache get method for text format %format.', array('%format' => $this->format->name)));
+  }
+
+}
diff --git a/core/modules/filter/src/Tests/FilterSettingsTest.php b/core/modules/filter/src/Tests/FilterSettingsTest.php
index b88fcec..81e2ff5 100644
--- a/core/modules/filter/src/Tests/FilterSettingsTest.php
+++ b/core/modules/filter/src/Tests/FilterSettingsTest.php
@@ -40,9 +40,9 @@ function testFilterDefaults() {
     $saved_settings = array();
     foreach ($filter_defaults_format->filters() as $name => $filter) {
       $expected_weight = $filter_info[$name]['weight'];
-      $this->assertEqual($filter->weight, $expected_weight, format_string('@name filter weight %saved equals %default', array(
+      $this->assertEqual($filter->getWeight(), $expected_weight, format_string('@name filter weight %saved equals %default', array(
         '@name' => $name,
-        '%saved' => $filter->weight,
+        '%saved' => $filter->getWeight(),
         '%default' => $expected_weight,
       )));
       $saved_settings[$name]['weight'] = $expected_weight;
@@ -55,9 +55,9 @@ function testFilterDefaults() {
 
     // Verify that saved filter settings have not been changed.
     foreach ($filter_defaults_format->filters() as $name => $filter) {
-      $this->assertEqual($filter->weight, $saved_settings[$name]['weight'], format_string('@name filter weight %saved equals %previous', array(
+      $this->assertEqual($filter->getWeight(), $saved_settings[$name]['weight'], format_string('@name filter weight %saved equals %previous', array(
         '@name' => $name,
-        '%saved' => $filter->weight,
+        '%saved' => $filter->getWeight(),
         '%previous' => $saved_settings[$name]['weight'],
       )));
     }
