Browse Wiki & Semantic Web

Jump to: navigation, search
Http://dbpedia.org/resource/Field encapsulation
  This page has no properties.
hide properties that link here 
  No properties link to this page.
 
http://dbpedia.org/resource/Field_encapsulation
http://dbpedia.org/ontology/abstract Інкапсуля́ція по́ля (англ. Encapsulate Field) — прийом рефакторингу, що дозволяє полегшити роботу з даними, покращити модульність частин програми та полегшити її підтримку. Забезпечує зближення даних і поведінки над цими даними. , In computer programming, field encapsulatiIn computer programming, field encapsulation involves providing methods that can be used to read from or write to the field rather than accessing the field directly. Sometimes these accessor methods are called getX and setX (where X is the field's name), which are also known as mutator methods. Usually the accessor methods have public visibility while the field being encapsulated is given private visibility - this allows a programmer to restrict what actions another user of the code can perform. Compare the following Java class in which the name field has not been encapsulated: public class NormalFieldClass { public String name; public static void main(String[] args) { NormalFieldClass example1 = new NormalFieldClass; example1.name = "myName"; System.out.println("My name is " + example1.name); }} with the same example using encapsulation: public class EncapsulatedFieldClass { private String name; public String getName { return name; } public void setName(String newName) { name = newName; } public static void main(String[] args) { EncapsulatedFieldClass example1 = new EncapsulatedFieldClass; example1.setName("myName"); System.out.println("My name is " + example1.getName); }} In the first example a user is free to use the public name variable however they see fit - in the second however the writer of the class retains control over how the private name variable is read and written by only permitting access to the field via its getName and setName methods.field via its getName and setName methods.
http://dbpedia.org/ontology/wikiPageID 1727391
http://dbpedia.org/ontology/wikiPageLength 3880
http://dbpedia.org/ontology/wikiPageRevisionID 956134529
http://dbpedia.org/ontology/wikiPageWikiLink http://dbpedia.org/resource/Class_%28computer_science%29 + , http://dbpedia.org/resource/Mutator_method + , http://dbpedia.org/resource/Variable_%28programming%29 + , http://dbpedia.org/resource/Computer_programming + , http://dbpedia.org/resource/Category:Code_refactoring + , http://dbpedia.org/resource/Operating_system + , http://dbpedia.org/resource/Real-time_computing + , http://dbpedia.org/resource/Inline_function + , http://dbpedia.org/resource/Method_%28computer_science%29 + , http://dbpedia.org/resource/Java_%28programming_language%29 + , http://dbpedia.org/resource/Debugging + , http://dbpedia.org/resource/Embedded_system + , http://dbpedia.org/resource/Field_%28computer_science%29 + , http://dbpedia.org/resource/Side_effect_%28computer_science%29 +
http://dbpedia.org/property/wikiPageUsesTemplate http://dbpedia.org/resource/Template:Unreferenced +
http://purl.org/dc/terms/subject http://dbpedia.org/resource/Category:Code_refactoring +
http://www.w3.org/ns/prov#wasDerivedFrom http://en.wikipedia.org/wiki/Field_encapsulation?oldid=956134529&ns=0 +
http://xmlns.com/foaf/0.1/isPrimaryTopicOf http://en.wikipedia.org/wiki/Field_encapsulation +
owl:sameAs https://global.dbpedia.org/id/4jd7c + , http://www.wikidata.org/entity/Q5446993 + , http://uk.dbpedia.org/resource/%D0%86%D0%BD%D0%BA%D0%B0%D0%BF%D1%81%D1%83%D0%BB%D1%8F%D1%86%D1%96%D1%8F_%D0%BF%D0%BE%D0%BB%D1%8F + , http://rdf.freebase.com/ns/m.05rj6r + , http://dbpedia.org/resource/Field_encapsulation +
rdfs:comment Інкапсуля́ція по́ля (англ. Encapsulate Field) — прийом рефакторингу, що дозволяє полегшити роботу з даними, покращити модульність частин програми та полегшити її підтримку. Забезпечує зближення даних і поведінки над цими даними. , In computer programming, field encapsulatiIn computer programming, field encapsulation involves providing methods that can be used to read from or write to the field rather than accessing the field directly. Sometimes these accessor methods are called getX and setX (where X is the field's name), which are also known as mutator methods. Usually the accessor methods have public visibility while the field being encapsulated is given private visibility - this allows a programmer to restrict what actions another user of the code can perform. Compare the following Java class in which the name field has not been encapsulated: the name field has not been encapsulated:
rdfs:label Інкапсуляція поля , Field encapsulation
hide properties that link here 
http://dbpedia.org/resource/Code_refactoring + , http://dbpedia.org/resource/Encapsulate_Field + http://dbpedia.org/ontology/wikiPageWikiLink
http://en.wikipedia.org/wiki/Field_encapsulation + http://xmlns.com/foaf/0.1/primaryTopic
http://dbpedia.org/resource/Field_encapsulation + owl:sameAs
 

 

Enter the name of the page to start semantic browsing from.